diff --git a/src/helpers.rs b/src/helpers.rs index 7f99aa19970..a9cafd2a9e3 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -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 + }) } }