Skip to content

Commit 1083ae6

Browse files
committed
better error message on failure to parse type
1 parent 313a5ab commit 1083ae6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libsyntax/parse/parser.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,8 @@ pub impl Parser {
698698
let path = self.parse_path_with_tps(false);
699699
ty_path(path, self.get_id())
700700
} else {
701-
self.fatal(~"expected type");
701+
self.fatal(fmt!("expected type, found token %?",
702+
*self.token));
702703
};
703704

704705
let sp = mk_sp(lo, self.last_span.hi);

0 commit comments

Comments
 (0)