Skip to content

Commit 64fbdc3

Browse files
committed
explicit adt_dtorck_constraint for ManuallyDrop
1 parent 3e565f1 commit 64fbdc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_traits/src/dropck_outlives.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ pub(crate) fn adt_dtorck_constraint(
292292
let span = tcx.def_span(def_id);
293293
debug!("dtorck_constraint: {:?}", def);
294294

295-
if def.is_phantom_data() {
295+
if def.is_manually_drop() {
296+
bug!("`ManuallyDrop` should have been handled by `trivial_dropck_outlives`");
297+
} else if def.is_phantom_data() {
296298
// The first generic parameter here is guaranteed to be a type because it's
297299
// `PhantomData`.
298300
let substs = InternalSubsts::identity_for_item(tcx, def_id);

0 commit comments

Comments
 (0)