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