about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-04-10 16:19:54 -0700
committerJohn Clements <clements@racket-lang.org>2013-04-16 10:06:06 -0700
commit1083ae6b06939292c104f2a71fb2ebfaf9a2c70e (patch)
treee904142c27bee16501b1c6caaabdc0985d6b39eb /src/libsyntax/parse/parser.rs
parent313a5ab94622532c4de316ed6d82b0788be31266 (diff)
downloadrust-1083ae6b06939292c104f2a71fb2ebfaf9a2c70e.tar.gz
rust-1083ae6b06939292c104f2a71fb2ebfaf9a2c70e.zip
better error message on failure to parse type
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index fb3e8a5ded5..360742b37b7 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -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);