rustc: Emit a better error message when a type is used where a value was expected
This commit is contained in:
parent
8d8a48cfc4
commit
2c21195b21
@ -184,6 +184,11 @@ fn ty_params_and_ty_for_def(@fn_ctxt fcx, &ast.def defn)
|
||||
ret tup(none[vec[ast.def_id]], plain_ty(ty.ty_nil));
|
||||
}
|
||||
|
||||
case (ast.def_ty(_)) {
|
||||
fcx.ccx.sess.err("expected value but found type");
|
||||
fail;
|
||||
}
|
||||
|
||||
case (_) {
|
||||
// FIXME: handle other names.
|
||||
fcx.ccx.sess.unimpl("definition variant");
|
||||
|
Loading…
Reference in New Issue
Block a user