Don't unwrap() in in_std()
This commit is contained in:
parent
879000b133
commit
545101040d
1 changed files with 4 additions and 2 deletions
|
|
@ -631,8 +631,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
|
||||
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…
Add table
Add a link
Reference in a new issue