File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
6767 if tcx. sess . compile_status ( ) . is_err ( ) {
6868 tcx. sess . fatal ( "miri cannot be run on programs that fail compilation" ) ;
6969 }
70- ;
70+
7171 init_late_loggers ( handler, tcx) ;
7272 if !tcx. sess . crate_types ( ) . contains ( & CrateType :: Executable ) {
7373 tcx. sess . fatal ( "miri only makes sense on bin crates" ) ;
Original file line number Diff line number Diff line change @@ -365,7 +365,11 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
365365
366366 match entry_type {
367367 EntryFnType :: Main { .. } => {
368- let start_id = tcx. lang_items ( ) . start_fn ( ) . unwrap ( ) ;
368+ let start_id = tcx. lang_items ( ) . start_fn ( ) . unwrap_or_else ( || {
369+ tcx. sess . fatal (
370+ "could not find start function. Make sure the entry point is marked with `#[start]`."
371+ ) ;
372+ } ) ;
369373 let main_ret_ty = tcx. fn_sig ( entry_id) . no_bound_vars ( ) . unwrap ( ) . output ( ) ;
370374 let main_ret_ty = main_ret_ty. no_bound_vars ( ) . unwrap ( ) ;
371375 let start_instance = ty:: Instance :: resolve (
You can’t perform that action at this time.
0 commit comments