Skip to content

Commit a74eba4

Browse files
committed
Make ManuallyDrop satisfy ~const Destruct
1 parent 9a963e3 commit a74eba4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_trait_selection/src/traits/select/confirmation.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
12241224
| ty::Never
12251225
| ty::Foreign(_) => {}
12261226

1227+
// `ManuallyDrop` is trivially drop
1228+
ty::Adt(def, _) if Some(def.did()) == tcx.lang_items().manually_drop() => {}
1229+
12271230
// These types are built-in, so we can fast-track by registering
12281231
// nested predicates for their constituent type(s)
12291232
ty::Array(ty, _) | ty::Slice(ty) => {

0 commit comments

Comments
 (0)