bug! with a better error message for failing Instance::resolve
This commit is contained in:
parent
34336b8d94
commit
f7c76ad662
@ -349,9 +349,8 @@ pub(crate) fn codegen_terminator_call<'tcx>(
|
||||
|
||||
// Handle special calls like intrinsics and empty drop glue.
|
||||
let instance = if let ty::FnDef(def_id, substs) = *fn_ty.kind() {
|
||||
let instance = ty::Instance::resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs)
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
let instance =
|
||||
ty::Instance::expect_resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, substs)
|
||||
.polymorphize(fx.tcx);
|
||||
|
||||
if fx.tcx.symbol_name(instance).name.starts_with("llvm.") {
|
||||
|
Loading…
Reference in New Issue
Block a user