librustc: Stop parsing [T * N]
.
This commit is contained in:
parent
142dbd65da
commit
a376f46862
@ -78,7 +78,7 @@ pub enum LangItem {
|
||||
}
|
||||
|
||||
pub struct LanguageItems {
|
||||
items: [ Option<def_id> * 35 ]
|
||||
items: [Option<def_id>, ..35]
|
||||
}
|
||||
|
||||
pub impl LanguageItems {
|
||||
|
@ -61,6 +61,7 @@ pub enum ObsoleteSyntax {
|
||||
ObsoletePurity,
|
||||
ObsoleteStaticMethod,
|
||||
ObsoleteConstItem,
|
||||
ObsoleteFixedLengthVectorType,
|
||||
}
|
||||
|
||||
impl to_bytes::IterBytes for ObsoleteSyntax {
|
||||
@ -209,6 +210,10 @@ pub impl Parser {
|
||||
"`const` items are now `static` items; replace `const` with \
|
||||
`static`"
|
||||
),
|
||||
ObsoleteFixedLengthVectorType => (
|
||||
"fixed-length vector notation",
|
||||
"instead of `[T * N]`, write `[T, ..N]`"
|
||||
),
|
||||
};
|
||||
|
||||
self.report(sp, kind, kind_str, desc);
|
||||
|
@ -81,7 +81,7 @@ use parse::obsolete::{ObsoleteBareFnType, ObsoleteNewtypeEnum};
|
||||
use parse::obsolete::{ObsoleteMode, ObsoleteImplicitSelf};
|
||||
use parse::obsolete::{ObsoleteLifetimeNotation, ObsoleteConstManagedPointer};
|
||||
use parse::obsolete::{ObsoletePurity, ObsoleteStaticMethod};
|
||||
use parse::obsolete::{ObsoleteConstItem};
|
||||
use parse::obsolete::{ObsoleteConstItem, ObsoleteFixedLengthVectorType};
|
||||
use parse::prec::{as_prec, token_to_binop};
|
||||
use parse::token::{can_begin_expr, is_ident, is_ident_or_path};
|
||||
use parse::token::{is_plain_ident, INTERPOLATED, special_idents};
|
||||
@ -825,7 +825,7 @@ pub impl Parser {
|
||||
|
||||
fn maybe_parse_fixed_vstore(&self) -> Option<@ast::expr> {
|
||||
if self.eat(&token::BINOP(token::STAR)) {
|
||||
// XXX: Obsolete; remove after snapshot.
|
||||
self.obsolete(*self.last_span, ObsoleteFixedLengthVectorType);
|
||||
Some(self.parse_expr())
|
||||
} else if *self.token == token::COMMA &&
|
||||
self.look_ahead(1) == token::DOTDOT {
|
||||
|
Loading…
Reference in New Issue
Block a user