better error message on failure to parse type
This commit is contained in:
parent
313a5ab946
commit
1083ae6b06
1 changed files with 2 additions and 1 deletions
|
|
@ -698,7 +698,8 @@ pub impl Parser {
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue