Skip to content

Commit 14b3ad1

Browse files
committed
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.
1 parent 0f8e58e commit 14b3ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comp/middle/typeck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,7 @@ fn check_main_fn_ty(tcx: &ty::ctxt, main_id: &ast::node_id) {
26862686
}
26872687
}
26882688
_ {
2689-
tcx.sess.err("Main has a non-function type: found" +
2689+
tcx.sess.bug("main has a non-function type: found" +
26902690
ty_to_str(tcx, main_t));
26912691
}
26922692
}

0 commit comments

Comments
 (0)