exhaustive matches are good
This commit is contained in:
parent
55be59d2ce
commit
8a0802089c
@ -172,7 +172,31 @@ where
|
|||||||
queue_type(self, component);
|
queue_type(self, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => return Some(Err(AlwaysRequiresDrop)),
|
|
||||||
|
ty::Foreign(_) | ty::Dynamic(..) | ty::Placeholder(_) => {
|
||||||
|
return Some(Err(AlwaysRequiresDrop));
|
||||||
|
}
|
||||||
|
|
||||||
|
ty::Bool
|
||||||
|
| ty::Char
|
||||||
|
| ty::Int(_)
|
||||||
|
| ty::Uint(_)
|
||||||
|
| ty::Float(_)
|
||||||
|
| ty::Str
|
||||||
|
| ty::Slice(_)
|
||||||
|
| ty::Ref(..)
|
||||||
|
| ty::RawPtr(..)
|
||||||
|
| ty::FnDef(..)
|
||||||
|
| ty::FnPtr(..)
|
||||||
|
| ty::Tuple(_)
|
||||||
|
| ty::Bound(..)
|
||||||
|
| ty::GeneratorWitness(..)
|
||||||
|
| ty::GeneratorWitnessMIR(..)
|
||||||
|
| ty::Never
|
||||||
|
| ty::Infer(_)
|
||||||
|
| ty::Error(_) => {
|
||||||
|
bug!("unexpected type returned by `needs_drop_components`: {component}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user