We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Adt
Unique
1 parent 6fc0273 commit 74aad5cCopy full SHA for 74aad5c
compiler/rustc_mir_transform/src/add_retag.rs
@@ -28,6 +28,7 @@ fn may_contain_reference<'tcx>(ty: Ty<'tcx>, depth: u32, tcx: TyCtxt<'tcx>) -> b
28
// References
29
ty::Ref(..) => true,
30
ty::Adt(..) if ty.is_box() => true,
31
+ ty::Adt(adt, _) if Some(adt.did()) == tcx.lang_items().ptr_unique() => true,
32
// Compound types: recurse
33
ty::Array(ty, _) | ty::Slice(ty) => {
34
// This does not branch so we keep the depth the same.
0 commit comments