diff options
| author | lcnr <rust@lcnr.de> | 2023-04-14 15:44:05 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-04-14 15:44:05 +0200 |
| commit | 64fbdc37799b44a85a2dd6cb491ee96e6931cb5d (patch) | |
| tree | 3303b5f8116f493cc22b8165dda8ca2bb1c0958a | |
| parent | 3e565f1a27a19f7da48c7109500b4351c0819e68 (diff) | |
| download | rust-64fbdc37799b44a85a2dd6cb491ee96e6931cb5d.tar.gz rust-64fbdc37799b44a85a2dd6cb491ee96e6931cb5d.zip | |
explicit adt_dtorck_constraint for ManuallyDrop
| -rw-r--r-- | compiler/rustc_traits/src/dropck_outlives.rs | 4 |
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 b5924e94914..58117c46f04 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); |
