mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-03 13:37:37 +00:00
use Instance::expect_resolve() instead of unwraping Instance::resolve()
This commit is contained in:
parent
ed5c3bc397
commit
dd9407dcbe
@ -473,14 +473,12 @@ impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
|||||||
let tcx = self.tcx;
|
let tcx = self.tcx;
|
||||||
let func = match tcx.lang_items().eh_personality() {
|
let func = match tcx.lang_items().eh_personality() {
|
||||||
Some(def_id) if !wants_msvc_seh(self.sess()) => {
|
Some(def_id) if !wants_msvc_seh(self.sess()) => {
|
||||||
let instance = ty::Instance::resolve(
|
let instance = ty::Instance::expect_resolve(
|
||||||
tcx,
|
tcx,
|
||||||
ty::ParamEnv::reveal_all(),
|
ty::ParamEnv::reveal_all(),
|
||||||
def_id,
|
def_id,
|
||||||
ty::List::empty(),
|
ty::List::empty(),
|
||||||
)
|
);
|
||||||
.unwrap()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let symbol_name = tcx.symbol_name(instance).name;
|
let symbol_name = tcx.symbol_name(instance).name;
|
||||||
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());
|
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());
|
||||||
|
Loading…
Reference in New Issue
Block a user