Skip to content

Commit

Permalink
Rollup merge of #102204 - fee1-dead-contrib:manually-drop-trivially-d…
Browse files Browse the repository at this point in the history
…rop, r=oli-obk

Make `ManuallyDrop` satisfy `~const Destruct`
  • Loading branch information
matthiaskrgr committed Sep 24, 2022
2 parents 1c4a85f + a74eba4 commit 5fb41a6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 5fb41a6

Please sign in to comment.