We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
DynMetadata
1 parent 213ad10 commit 1caff8eCopy full SHA for 1caff8e
compiler/rustc_mir_transform/src/sroa.rs
@@ -70,6 +70,11 @@ fn escaping_locals<'tcx>(
70
// Exclude #[repr(simd)] types so that they are not de-optimized into an array
71
return true;
72
}
73
+ if Some(def.did()) == tcx.lang_items().dyn_metadata() {
74
+ // codegen wants to see the `DynMetadata<T>`,
75
+ // not the inner reference-to-opaque-type.
76
+ return true;
77
+ }
78
// We already excluded unions and enums, so this ADT must have one variant
79
let variant = def.variant(FIRST_VARIANT);
80
if variant.fields.len() > 1 {
0 commit comments