explicit adt_dtorck_constraint for ManuallyDrop
This commit is contained in:
parent
3e565f1a27
commit
64fbdc3779
@ -292,7 +292,9 @@ pub(crate) fn adt_dtorck_constraint(
|
|||||||
let span = tcx.def_span(def_id);
|
let span = tcx.def_span(def_id);
|
||||||
debug!("dtorck_constraint: {:?}", def);
|
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
|
// The first generic parameter here is guaranteed to be a type because it's
|
||||||
// `PhantomData`.
|
// `PhantomData`.
|
||||||
let substs = InternalSubsts::identity_for_item(tcx, def_id);
|
let substs = InternalSubsts::identity_for_item(tcx, def_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user