librustc: Remove &const
and *const
from the language.
They are still present as part of the borrow check.
This commit is contained in:
parent
58d6eb5048
commit
5c3504799d
48 changed files with 309 additions and 460 deletions
|
@ -38,7 +38,7 @@ use ast::{ident, impure_fn, inherited, item, item_, item_static};
|
|||
use ast::{item_enum, item_fn, item_foreign_mod, item_impl};
|
||||
use ast::{item_mac, item_mod, item_struct, item_trait, item_ty, lit, lit_};
|
||||
use ast::{lit_bool, lit_float, lit_float_unsuffixed, lit_int};
|
||||
use ast::{lit_int_unsuffixed, lit_nil, lit_str, lit_uint, Local, m_const};
|
||||
use ast::{lit_int_unsuffixed, lit_nil, lit_str, lit_uint, Local};
|
||||
use ast::{m_imm, m_mutbl, mac_, mac_invoc_tt, matcher, match_nonterminal};
|
||||
use ast::{match_seq, match_tok, method, mt, mul, mutability};
|
||||
use ast::{named_field, neg, NodeId, noreturn, not, pat, pat_box, pat_enum};
|
||||
|
@ -1153,9 +1153,6 @@ impl Parser {
|
|||
if mt.mutbl != m_imm && sigil == OwnedSigil {
|
||||
self.obsolete(*self.last_span, ObsoleteMutOwnedPointer);
|
||||
}
|
||||
if mt.mutbl == m_const && sigil == ManagedSigil {
|
||||
self.obsolete(*self.last_span, ObsoleteConstManagedPointer);
|
||||
}
|
||||
|
||||
ctor(mt)
|
||||
}
|
||||
|
@ -1568,7 +1565,8 @@ impl Parser {
|
|||
if self.eat_keyword(keywords::Mut) {
|
||||
m_mutbl
|
||||
} else if self.eat_keyword(keywords::Const) {
|
||||
m_const
|
||||
self.obsolete(*self.last_span, ObsoleteConstPointer);
|
||||
m_imm
|
||||
} else {
|
||||
m_imm
|
||||
}
|
||||
|
@ -1727,7 +1725,7 @@ impl Parser {
|
|||
} else if *self.token == token::LBRACKET {
|
||||
self.bump();
|
||||
let mutbl = self.parse_mutability();
|
||||
if mutbl == m_mutbl || mutbl == m_const {
|
||||
if mutbl == m_mutbl {
|
||||
self.obsolete(*self.last_span, ObsoleteMutVector);
|
||||
}
|
||||
|
||||
|
@ -2182,10 +2180,6 @@ impl Parser {
|
|||
token::AT => {
|
||||
self.bump();
|
||||
let m = self.parse_mutability();
|
||||
if m == m_const {
|
||||
self.obsolete(*self.last_span, ObsoleteConstManagedPointer);
|
||||
}
|
||||
|
||||
let e = self.parse_prefix_expr();
|
||||
hi = e.span.hi;
|
||||
// HACK: turn @[...] into a @-evec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue