better error message on failure to parse type

This commit is contained in:
John Clements 2013-04-10 16:19:54 -07:00
parent 313a5ab946
commit 1083ae6b06

View File

@ -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);