Monomorphize const type during codegen.
This commit is contained in:
parent
99a864be39
commit
821f4a9dfb
@ -30,7 +30,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
||||
}
|
||||
_ => {
|
||||
let val = self.eval_mir_constant(constant)?;
|
||||
Ok(OperandRef::from_const(bx, val.clone(), constant.literal.ty))
|
||||
let ty = self.monomorphize(&constant.literal.ty);
|
||||
Ok(OperandRef::from_const(bx, val.clone(), ty))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user