about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index f38d0f9cc77..3b53dbc89fc 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -2489,8 +2489,10 @@ fn parse_crate_mod(p: parser, _cfg: ast::crate_cfg) -> @ast::crate {
 
 fn parse_str(p: parser) -> str {
     alt p.peek() {
-      token::LIT_STR(s) { p.bump(); ret p.get_str(s); }
-      _ { fail; }
+      token::LIT_STR(s) { p.bump(); p.get_str(s) }
+      _ {
+        p.fatal("expected string literal")
+      }
     }
 }