use Instance::expect_resolve() instead of unwraping Instance::resolve()
This commit is contained in:
parent
094a6204f5
commit
aa9145e6ea
6 changed files with 20 additions and 33 deletions
|
@ -558,11 +558,12 @@ impl<'ll, 'tcx> MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
|
||||
let tcx = self.tcx;
|
||||
let llfn = match tcx.lang_items().eh_personality() {
|
||||
Some(def_id) if name.is_none() => self.get_fn_addr(
|
||||
ty::Instance::resolve(tcx, ty::ParamEnv::reveal_all(), def_id, ty::List::empty())
|
||||
.unwrap()
|
||||
.unwrap(),
|
||||
),
|
||||
Some(def_id) if name.is_none() => self.get_fn_addr(ty::Instance::expect_resolve(
|
||||
tcx,
|
||||
ty::ParamEnv::reveal_all(),
|
||||
def_id,
|
||||
ty::List::empty(),
|
||||
)),
|
||||
_ => {
|
||||
let name = name.unwrap_or("rust_eh_personality");
|
||||
if let Some(llfn) = self.get_declared_value(name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue