Skip to content

Commit 0f0a977

Browse files
committed
Some error message cleanup in check.rs.
1 parent 5d5cfcc commit 0f0a977

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/rustc/middle/typeck/check.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,27 +2323,24 @@ fn ty_param_bounds_and_ty_for_def(fcx: @fn_ctxt, sp: span, defn: ast::def) ->
23232323
ast::def_upvar(_, inner, _, _) => {
23242324
return ty_param_bounds_and_ty_for_def(fcx, sp, *inner);
23252325
}
2326-
ast::def_ty_param(did, n) => {
2327-
return no_params(ty::mk_param(fcx.ccx.tcx, n, did));
2328-
}
2329-
ast::def_ty(_) | ast::def_prim_ty(_) => {
2330-
fcx.ccx.tcx.sess.span_fatal(sp, ~"expected value but found type");
2326+
ast::def_ty(_) | ast::def_prim_ty(_) | ast::def_ty_param(*)=> {
2327+
fcx.ccx.tcx.sess.span_bug(sp, ~"expected value but found type");
23312328
}
23322329
ast::def_mod(*) | ast::def_foreign_mod(*) => {
2333-
fcx.ccx.tcx.sess.span_fatal(sp, ~"expected value but found module");
2330+
fcx.ccx.tcx.sess.span_bug(sp, ~"expected value but found module");
23342331
}
23352332
ast::def_use(*) => {
2336-
fcx.ccx.tcx.sess.span_fatal(sp, ~"expected value but found use");
2333+
fcx.ccx.tcx.sess.span_bug(sp, ~"expected value but found use");
23372334
}
23382335
ast::def_region(*) => {
2339-
fcx.ccx.tcx.sess.span_fatal(sp, ~"expected value but found region");
2336+
fcx.ccx.tcx.sess.span_bug(sp, ~"expected value but found region");
23402337
}
23412338
ast::def_typaram_binder(*) => {
2342-
fcx.ccx.tcx.sess.span_fatal(sp, ~"expected value but found type \
2339+
fcx.ccx.tcx.sess.span_bug(sp, ~"expected value but found type \
23432340
parameter");
23442341
}
23452342
ast::def_label(*) => {
2346-
fcx.ccx.tcx.sess.span_fatal(sp, ~"expected value but found label");
2343+
fcx.ccx.tcx.sess.span_bug(sp, ~"expected value but found label");
23472344
}
23482345
}
23492346
}

0 commit comments

Comments
 (0)