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:
Brian Anderson 2011-08-10 21:13:57 -07:00
parent 0f8e58e3ce
commit 14b3ad194a

View File

@ -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));
}
}