Replace 'mutable?' with 'const'

This commit is contained in:
Brian Anderson 2011-11-16 14:41:32 -08:00
parent 1d361f6806
commit b655fb9ea7
23 changed files with 53 additions and 54 deletions

View file

@ -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 {

View file

@ -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 */ }
}
}