about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-13 17:11:08 -0800
committerbors <bors@rust-lang.org>2013-02-13 17:11:08 -0800
commit0ae74bef188fe4f1fff69c0fa85d308c40bce7f8 (patch)
treef5258cb43faeb5f36f816e4a2d04442c987423b4 /src/libsyntax/parse
parentc51ecc3223ed64b7948f40097c5083da0c201811 (diff)
parent4445b38df27777b043cad9ecc2452daad3469949 (diff)
downloadrust-0ae74bef188fe4f1fff69c0fa85d308c40bce7f8.tar.gz
rust-0ae74bef188fe4f1fff69c0fa85d308c40bce7f8.zip
auto merge of #4905 : brson/rust/issue4524, r=brson
Rebase of #4895
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/comments.rs4
-rw-r--r--src/libsyntax/parse/lexer.rs2
-rw-r--r--src/libsyntax/parse/parser.rs4
-rw-r--r--src/libsyntax/parse/token.rs4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index a8db06fe085..1e17cf3543d 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -117,7 +117,7 @@ pub fn strip_doc_comment_decoration(comment: ~str) -> ~str {
         return str::connect(lines, ~"\n");
     }
 
-    die!(~"not a doc-comment: " + comment);
+    fail!(~"not a doc-comment: " + comment);
 }
 
 fn read_to_eol(rdr: @mut StringReader) -> ~str {
@@ -297,7 +297,7 @@ fn consume_comment(rdr: @mut StringReader,
         read_block_comment(rdr, code_to_the_left, comments);
     } else if rdr.curr == '#' && nextch(rdr) == '!' {
         read_shebang_comment(rdr, code_to_the_left, comments);
-    } else { die!(); }
+    } else { fail!(); }
     debug!("<<< consume comment");
 }
 
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index e8afd0b96a2..48ba94bdc33 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -215,7 +215,7 @@ fn hex_digit_val(c: char) -> int {
     if in_range(c, '0', '9') { return (c as int) - ('0' as int); }
     if in_range(c, 'a', 'f') { return (c as int) - ('a' as int) + 10; }
     if in_range(c, 'A', 'F') { return (c as int) - ('A' as int) + 10; }
-    die!();
+    fail!();
 }
 
 fn bin_digit_value(c: char) -> int { if c == '0' { return 0; } return 1; }
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 6382413b081..1fcd99e1946 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2538,7 +2538,7 @@ pub impl Parser {
                           _ => None
                         }
                       }
-                      _ => die!()
+                      _ => fail!()
                     };
 
                     match maybe_bound {
@@ -3907,7 +3907,7 @@ pub impl Parser {
             let metadata = self.parse_optional_meta();
             view_item_use(ident, metadata, self.get_id())
         } else {
-            die!();
+            fail!();
         };
         self.expect(token::SEMI);
         @ast::view_item { node: node,
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index b8d756d893a..dbcb3d756c8 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -210,7 +210,7 @@ pub fn to_str(in: @ident_interner, t: Token) -> ~str {
                       nt_block(*) => ~"block",
                       nt_stmt(*) => ~"statement",
                       nt_pat(*) => ~"pattern",
-                      nt_expr(*) => die!(~"should have been handled above"),
+                      nt_expr(*) => fail!(~"should have been handled above"),
                       nt_ty(*) => ~"type",
                       nt_ident(*) => ~"identifier",
                       nt_path(*) => ~"path",
@@ -263,7 +263,7 @@ pub fn flip_delimiter(t: token::Token) -> token::Token {
       token::RPAREN => token::LPAREN,
       token::RBRACE => token::LBRACE,
       token::RBRACKET => token::LBRACKET,
-      _ => die!()
+      _ => fail!()
     }
 }