Monomorphize const type during codegen.
This commit is contained in:
parent
99a864be39
commit
821f4a9dfb
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue