about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-16 14:41:32 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-16 14:41:32 -0800
commitb655fb9ea7d81d03cf049ae32babda19003631e5 (patch)
tree2bbf62e5072db9e28c10ca9d7efe668a2678cbdc /src/comp
parent1d361f680610bb0f75f80b8fc8ca03d04b13577b (diff)
downloadrust-b655fb9ea7d81d03cf049ae32babda19003631e5.tar.gz
rust-b655fb9ea7d81d03cf049ae32babda19003631e5.zip
Replace 'mutable?' with 'const'
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/syntax/parse/parser.rs3
-rw-r--r--src/comp/syntax/print/pprust.rs2
-rw-r--r--src/comp/util/ppaux.rs2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 4e393777d2a..3b2ba62ca93 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -746,8 +746,7 @@ fn parse_path_and_ty_param_substs(p: parser) -> ast::path {
 
 fn parse_mutability(p: parser) -> ast::mutability {
     if eat_word(p, "mutable") {
-        if p.peek() == token::QUES { p.bump(); ast::maybe_mut }
-        else { ast::mut }
+        ast::mut
     } else if eat_word(p, "const") {
         ast::maybe_mut
     } else {
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index e2d829f5217..f65ca2fbd57 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -1307,7 +1307,7 @@ fn print_op_maybe_parens(s: ps, expr: @ast::expr, outer_prec: int) {
 fn print_mutability(s: ps, mut: ast::mutability) {
     alt mut {
       ast::mut. { word_nbsp(s, "mutable"); }
-      ast::maybe_mut. { word_nbsp(s, "mutable?"); }
+      ast::maybe_mut. { word_nbsp(s, "const"); }
       ast::imm. {/* nothing */ }
     }
 }
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs
index b148b99cde8..fe899b8c59a 100644
--- a/src/comp/util/ppaux.rs
+++ b/src/comp/util/ppaux.rs
@@ -84,7 +84,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
         alt m.mut {
           ast::mut. { mstr = "mutable "; }
           ast::imm. { mstr = ""; }
-          ast::maybe_mut. { mstr = "mutable? "; }
+          ast::maybe_mut. { mstr = "const "; }
         }
         ret mstr + ty_to_str(cx, m.ty);
     }