summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_traits/src/dropck_outlives.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /compiler/rustc_traits/src/dropck_outlives.rs
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_traits/src/dropck_outlives.rs')
-rw-r--r--compiler/rustc_traits/src/dropck_outlives.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_traits/src/dropck_outlives.rs b/compiler/rustc_traits/src/dropck_outlives.rs
index b5924e949..58117c46f 100644
--- a/compiler/rustc_traits/src/dropck_outlives.rs
+++ b/compiler/rustc_traits/src/dropck_outlives.rs
@@ -292,7 +292,9 @@ pub(crate) fn adt_dtorck_constraint(
let span = tcx.def_span(def_id);
debug!("dtorck_constraint: {:?}", def);
- if def.is_phantom_data() {
+ if def.is_manually_drop() {
+ bug!("`ManuallyDrop` should have been handled by `trivial_dropck_outlives`");
+ } else if def.is_phantom_data() {
// The first generic parameter here is guaranteed to be a type because it's
// `PhantomData`.
let substs = InternalSubsts::identity_for_item(tcx, def_id);