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 {
67
67
if tcx. sess . compile_status ( ) . is_err ( ) {
68
68
tcx. sess . fatal ( "miri cannot be run on programs that fail compilation" ) ;
69
69
}
70
- ;
70
+
71
71
init_late_loggers ( handler, tcx) ;
72
72
if !tcx. sess . crate_types ( ) . contains ( & CrateType :: Executable ) {
73
73
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>(
365
365
366
366
match entry_type {
367
367
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
+ } ) ;
369
373
let main_ret_ty = tcx. fn_sig ( entry_id) . no_bound_vars ( ) . unwrap ( ) . output ( ) ;
370
374
let main_ret_ty = main_ret_ty. no_bound_vars ( ) . unwrap ( ) ;
371
375
let start_instance = ty:: Instance :: resolve (
You can’t perform that action at this time.
0 commit comments