mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
better error message on failure to parse type
This commit is contained in:
@@ -698,7 +698,8 @@ fn parse_ty(&self, _: bool) -> @Ty {
|
||||
let path = self.parse_path_with_tps(false);
|
||||
ty_path(path, self.get_id())
|
||||
} else {
|
||||
self.fatal(~"expected type");
|
||||
self.fatal(fmt!("expected type, found token %?",
|
||||
*self.token));
|
||||
};
|
||||
|
||||
let sp = mk_sp(lo, self.last_span.hi);
|
||||
|
||||
Reference in New Issue
Block a user