diff options
| author | bors <bors@rust-lang.org> | 2013-06-29 12:02:05 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-29 12:02:05 -0700 |
| commit | c86df3a65cc239fd69b9a8d628808498cdb07e0d (patch) | |
| tree | b2557de482d3c0946cd683bd92dff65a1adf15f4 /src/libsyntax/parse | |
| parent | 88830996d811be3ff833ba590c98f28daaf31f43 (diff) | |
| parent | 3bad7129ebb13d7a4c0a7965aeb5bd536cc0f5f0 (diff) | |
| download | rust-c86df3a65cc239fd69b9a8d628808498cdb07e0d.tar.gz rust-c86df3a65cc239fd69b9a8d628808498cdb07e0d.zip | |
auto merge of #7342 : alexcrichton/rust/assort-cleanup, r=cmr
This removes usage of `&const` throughout the standard libraries/compiler, and it removes some extraneous fields in the AST now that unique boxes always inherit their mutability.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f1b5c4d16be..cc0baa28e20 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2071,9 +2071,8 @@ impl Parser { ex = match e.node { expr_vec(*) | expr_lit(@codemap::spanned { node: lit_str(_), span: _}) | - expr_repeat(*) - if m == m_imm => expr_vstore(e, expr_vstore_uniq), - _ => self.mk_unary(uniq(m), e) + expr_repeat(*) => expr_vstore(e, expr_vstore_uniq), + _ => self.mk_unary(uniq, e) }; } _ => return self.parse_dot_or_call_expr() @@ -3366,7 +3365,12 @@ impl Parser { maybe_parse_explicit_self(sty_box, self) } token::TILDE => { - maybe_parse_explicit_self(sty_uniq, self) + maybe_parse_explicit_self(|mutability| { + if mutability != m_imm { + self.obsolete(*self.last_span, ObsoleteMutOwnedPointer); + } + sty_uniq + }, self) } token::IDENT(*) if self.is_self_ident() => { self.bump(); |
