about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-22 11:09:13 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-22 12:57:27 -0700
commite7c60c141b6f499ba551b53bc562925269d2f187 (patch)
treee43edc564d34f7d4f5c9b6e5b9dedfb946230d46 /src/libsyntax/parse
parentec59ce5796723ff62c071f7b36577175c6001791 (diff)
downloadrust-e7c60c141b6f499ba551b53bc562925269d2f187.tar.gz
rust-e7c60c141b6f499ba551b53bc562925269d2f187.zip
librustc: Remove `pure` from libsyntax and librustc.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/comments.rs4
-rw-r--r--src/libsyntax/parse/common.rs2
-rw-r--r--src/libsyntax/parse/lexer.rs10
-rw-r--r--src/libsyntax/parse/obsolete.rs2
-rw-r--r--src/libsyntax/parse/parser.rs6
-rw-r--r--src/libsyntax/parse/token.rs14
6 files changed, 19 insertions, 19 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index 6ebaa42357e..3f8a5588c71 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -35,10 +35,10 @@ pub enum cmnt_style {
 }
 
 impl cmp::Eq for cmnt_style {
-    pure fn eq(&self, other: &cmnt_style) -> bool {
+    fn eq(&self, other: &cmnt_style) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    pure fn ne(&self, other: &cmnt_style) -> bool {
+    fn ne(&self, other: &cmnt_style) -> bool {
         ((*self) as uint) != ((*other) as uint)
     }
 }
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs
index 1b64a9a6275..ea599e8290a 100644
--- a/src/libsyntax/parse/common.rs
+++ b/src/libsyntax/parse/common.rs
@@ -134,7 +134,7 @@ pub impl Parser {
         }
     }
 
-    pure fn token_is_word(&self, word: &~str, tok: &token::Token) -> bool {
+    fn token_is_word(&self, word: &~str, tok: &token::Token) -> bool {
         match *tok {
             token::IDENT(sid, false) => { *self.id_to_str(sid) == *word }
              _ => { false }
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index f53ac271901..ffd2a1d801c 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -32,7 +32,7 @@ pub trait reader {
     fn next_token(@mut self) -> TokenAndSpan;
     fn fatal(@mut self, ~str) -> !;
     fn span_diag(@mut self) -> @span_handler;
-    pure fn interner(@mut self) -> @token::ident_interner;
+    fn interner(@mut self) -> @token::ident_interner;
     fn peek(@mut self) -> TokenAndSpan;
     fn dup(@mut self) -> @reader;
 }
@@ -122,7 +122,7 @@ impl reader for StringReader {
         self.span_diagnostic.span_fatal(copy self.peek_span, m)
     }
     fn span_diag(@mut self) -> @span_handler { self.span_diagnostic }
-    pure fn interner(@mut self) -> @token::ident_interner { self.interner }
+    fn interner(@mut self) -> @token::ident_interner { self.interner }
     fn peek(@mut self) -> TokenAndSpan {
         TokenAndSpan {
             tok: copy self.peek_tok,
@@ -139,7 +139,7 @@ impl reader for TtReader {
         self.sp_diag.span_fatal(copy self.cur_span, m);
     }
     fn span_diag(@mut self) -> @span_handler { self.sp_diag }
-    pure fn interner(@mut self) -> @token::ident_interner { self.interner }
+    fn interner(@mut self) -> @token::ident_interner { self.interner }
     fn peek(@mut self) -> TokenAndSpan {
         TokenAndSpan {
             tok: copy self.cur_tok,
@@ -261,7 +261,7 @@ fn consume_whitespace_and_comments(rdr: @mut StringReader)
     return consume_any_line_comment(rdr);
 }
 
-pub pure fn is_line_non_doc_comment(s: &str) -> bool {
+pub fn is_line_non_doc_comment(s: &str) -> bool {
     s.trim_right().all(|ch| ch == '/')
 }
 
@@ -313,7 +313,7 @@ fn consume_any_line_comment(rdr: @mut StringReader)
     return None;
 }
 
-pub pure fn is_block_non_doc_comment(s: &str) -> bool {
+pub fn is_block_non_doc_comment(s: &str) -> bool {
     fail_unless!(s.len() >= 1u);
     str::all_between(s, 1u, s.len() - 1u, |ch| ch == '*')
 }
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs
index 5cc1ea756e4..65eb87fb83c 100644
--- a/src/libsyntax/parse/obsolete.rs
+++ b/src/libsyntax/parse/obsolete.rs
@@ -63,7 +63,7 @@ pub enum ObsoleteSyntax {
 
 impl to_bytes::IterBytes for ObsoleteSyntax {
     #[inline(always)]
-    pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
+    fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         (*self as uint).iter_bytes(lsb0, f);
     }
 }
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e899c79a74c..302217c8c9a 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -196,8 +196,8 @@ macro_rules! maybe_whole (
 )
 
 
-pure fn maybe_append(+lhs: ~[attribute], rhs: Option<~[attribute]>)
-                  -> ~[attribute] {
+fn maybe_append(+lhs: ~[attribute], rhs: Option<~[attribute]>)
+             -> ~[attribute] {
     match rhs {
         None => lhs,
         Some(ref attrs) => vec::append(lhs, (*attrs))
@@ -331,7 +331,7 @@ pub impl Parser {
     }
     fn get_id(&self) -> node_id { next_node_id(self.sess) }
 
-    pure fn id_to_str(&self, id: ident) -> @~str {
+    fn id_to_str(&self, id: ident) -> @~str {
         self.sess.interner.get(id)
     }
 
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 5a774718b7d..f5542fa81a6 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -118,7 +118,7 @@ pub enum nonterminal {
     nt_matchers(~[ast::matcher])
 }
 
-pub pure fn binop_to_str(o: binop) -> ~str {
+pub fn binop_to_str(o: binop) -> ~str {
     match o {
       PLUS => ~"+",
       MINUS => ~"-",
@@ -228,7 +228,7 @@ pub fn to_str(in: @ident_interner, t: &Token) -> ~str {
     }
 }
 
-pub pure fn can_begin_expr(t: &Token) -> bool {
+pub fn can_begin_expr(t: &Token) -> bool {
     match *t {
       LPAREN => true,
       LBRACE => true,
@@ -286,22 +286,22 @@ pub fn is_lit(t: &Token) -> bool {
     }
 }
 
-pub pure fn is_ident(t: &Token) -> bool {
+pub fn is_ident(t: &Token) -> bool {
     match *t { IDENT(_, _) => true, _ => false }
 }
 
-pub pure fn is_ident_or_path(t: &Token) -> bool {
+pub fn is_ident_or_path(t: &Token) -> bool {
     match *t {
       IDENT(_, _) | INTERPOLATED(nt_path(*)) => true,
       _ => false
     }
 }
 
-pub pure fn is_plain_ident(t: &Token) -> bool {
+pub fn is_plain_ident(t: &Token) -> bool {
     match *t { IDENT(_, false) => true, _ => false }
 }
 
-pub pure fn is_bar(t: &Token) -> bool {
+pub fn is_bar(t: &Token) -> bool {
     match *t { BINOP(OR) | OROR => true, _ => false }
 }
 
@@ -366,7 +366,7 @@ pub impl ident_interner {
     fn gensym(&self, val: @~str) -> ast::ident {
         ast::ident { repr: self.interner.gensym(val) }
     }
-    pure fn get(&self, idx: ast::ident) -> @~str {
+    fn get(&self, idx: ast::ident) -> @~str {
         self.interner.get(idx.repr)
     }
     fn len(&self) -> uint {