mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
Switch a check for main type from an error to an ICE
This code path doesn't look possible, so I think it indicates a bug. Also, make the message lowercase.
This commit is contained in:
@@ -2686,7 +2686,7 @@ fn check_main_fn_ty(tcx: &ty::ctxt, main_id: &ast::node_id) {
|
||||
}
|
||||
}
|
||||
_ {
|
||||
tcx.sess.err("Main has a non-function type: found" +
|
||||
tcx.sess.bug("main has a non-function type: found" +
|
||||
ty_to_str(tcx, main_t));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user