Make ManuallyDrop satisfy ~const Destruct

This commit is contained in:
Deadbeef 2022-09-23 18:07:36 +00:00
parent 9a963e3bad
commit a74eba4ad5

View File

@ -1224,6 +1224,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
| ty::Never
| ty::Foreign(_) => {}
// `ManuallyDrop` is trivially drop
ty::Adt(def, _) if Some(def.did()) == tcx.lang_items().manually_drop() => {}
// These types are built-in, so we can fast-track by registering
// nested predicates for their constituent type(s)
ty::Array(ty, _) | ty::Slice(ty) => {