Skip to content

Commit 5fb41a6

Browse files
authored
Rollup merge of #102204 - fee1-dead-contrib:manually-drop-trivially-drop, r=oli-obk
Make `ManuallyDrop` satisfy `~const Destruct`
2 parents 1c4a85f + a74eba4 commit 5fb41a6

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)