We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79ec894 commit 8d2db1bCopy full SHA for 8d2db1b
src/base.rs
@@ -616,11 +616,13 @@ pub fn trans_place<'tcx>(
616
PlaceBase::Local(local) => fx.get_local_place(*local),
617
PlaceBase::Static(static_) => match static_.kind {
618
StaticKind::Static => {
619
+ // Statics can't be generic, so `static_.ty` doesn't need to be monomorphized.
620
crate::constant::codegen_static_ref(fx, static_.def_id, static_.ty)
621
}
622
StaticKind::Promoted(promoted, substs) => {
623
let instance = Instance::new(static_.def_id, fx.monomorphize(&substs));
- crate::constant::trans_promoted(fx, instance, promoted, static_.ty)
624
+ let ty = fx.monomorphize(&static_.ty);
625
+ crate::constant::trans_promoted(fx, instance, promoted, ty)
626
627
},
628
};
0 commit comments