diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-24 14:29:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-24 14:29:55 +0200 |
| commit | 5fb41a60319ad34628b270ff8f9973b73f25b3df (patch) | |
| tree | c1297e8e76e990a475d4f687946bb2ae2b7e2b17 /compiler/rustc_trait_selection/src | |
| parent | 1c4a85fc4062eba0ab17837b1b9643c9472480f6 (diff) | |
| parent | a74eba4ad56fe3138a23c471ad00d0e906bc3809 (diff) | |
| download | rust-5fb41a60319ad34628b270ff8f9973b73f25b3df.tar.gz rust-5fb41a60319ad34628b270ff8f9973b73f25b3df.zip | |
Rollup merge of #102204 - fee1-dead-contrib:manually-drop-trivially-drop, r=oli-obk
Make `ManuallyDrop` satisfy `~const Destruct`
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/confirmation.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs index e08f03a270c..27fbfb6dd21 100644 --- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs +++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs @@ -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) => { |
