Skip to content

Commit

Permalink
explicit adt_dtorck_constraint for ManuallyDrop
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Apr 14, 2023
1 parent 3e565f1 commit 64fbdc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_traits/src/dropck_outlives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 64fbdc3

Please sign in to comment.