From 14b3ad194ac80ec0bb4e6f570113bf15db587449 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 10 Aug 2011 21:13:57 -0700 Subject: [PATCH] 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. --- src/comp/middle/typeck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 43bbd5a08d1d..f2ef584214b7 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -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)); } }