Don't unwrap()
in in_std()
This commit is contained in:
parent
879000b133
commit
545101040d
@ -631,8 +631,10 @@ fn check_abi<'a>(&self, abi: Abi, exp_abi: Abi) -> InterpResult<'a, ()> {
|
||||
|
||||
fn in_std(&self) -> bool {
|
||||
let this = self.eval_context_ref();
|
||||
this.tcx.def_path(this.frame().instance.def_id()).krate
|
||||
== this.tcx.def_path(this.tcx.lang_items().start_fn().unwrap()).krate
|
||||
this.tcx.lang_items().start_fn().map_or(false, |start_fn| {
|
||||
this.tcx.def_path(this.frame().instance.def_id()).krate
|
||||
== this.tcx.def_path(start_fn).krate
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user