We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 247d38d commit 0e02cabCopy full SHA for 0e02cab
src/constant.rs
@@ -64,9 +64,9 @@ pub(crate) fn codegen_tls_ref<'tcx>(
64
65
pub(crate) fn eval_mir_constant<'tcx>(
66
fx: &FunctionCx<'_, '_, 'tcx>,
67
- constant: &Constant<'tcx>,
+ constant: &ConstOperand<'tcx>,
68
) -> (ConstValue<'tcx>, Ty<'tcx>) {
69
- let cv = fx.monomorphize(constant.literal);
+ let cv = fx.monomorphize(constant.const_);
70
// This cannot fail because we checked all required_consts in advance.
71
let val = cv
72
.eval(fx.tcx, ty::ParamEnv::reveal_all(), Some(constant.span))
@@ -76,7 +76,7 @@ pub(crate) fn eval_mir_constant<'tcx>(
76
77
pub(crate) fn codegen_constant_operand<'tcx>(
78
fx: &mut FunctionCx<'_, '_, 'tcx>,
79
80
) -> CValue<'tcx> {
81
let (const_val, ty) = eval_mir_constant(fx, constant);
82
codegen_const_value(fx, const_val, ty)
src/inline_asm.rs
@@ -252,8 +252,8 @@ pub(crate) fn codegen_inline_asm<'tcx>(
252
CInlineAsmOperand::Const { value }
253
}
254
InlineAsmOperand::SymFn { ref value } => {
255
- let literal = fx.monomorphize(value.literal);
256
- if let ty::FnDef(def_id, args) = *literal.ty().kind() {
+ let const_ = fx.monomorphize(value.const_);
+ if let ty::FnDef(def_id, args) = *const_.ty().kind() {
257
let instance = ty::Instance::resolve_for_fn_ptr(
258
fx.tcx,
259
ty::ParamEnv::reveal_all(),
0 commit comments