diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2022-09-23 18:07:36 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2022-09-23 18:07:36 +0000 |
| commit | a74eba4ad56fe3138a23c471ad00d0e906bc3809 (patch) | |
| tree | 25dc977e2ce401f2b422b33a9dff13e2e378d86f | |
| parent | 9a963e3bade50f48a58c14ab5e82646005654b59 (diff) | |
| download | rust-a74eba4ad56fe3138a23c471ad00d0e906bc3809.tar.gz rust-a74eba4ad56fe3138a23c471ad00d0e906bc3809.zip | |
Make `ManuallyDrop` satisfy `~const Destruct`
| -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) => { |
