Fix trait method calls

This commit is contained in:
bjorn3 2018-08-15 16:33:19 +02:00
parent ca59e4405e
commit 65fa8eddbb

View File

@ -106,7 +106,7 @@ fn trans_const_value<'a, 'tcx: 'a>(
CValue::const_val(fx, ty, bits as i128 as i64)
}
TypeVariants::TyFnDef(def_id, substs) => {
let func_ref = fx.get_function_ref(Instance::new(def_id, substs));
let func_ref = fx.get_function_ref(Instance::resolve(fx.tcx, ParamEnv::reveal_all(), def_id, substs).unwrap());
CValue::Func(func_ref, layout)
}
_ => trans_const_place(fx, const_).to_cvalue(fx),