1
Fork 0

introduce 'type AttrVec'

This commit is contained in:
Mazdak Farrokhzad 2019-12-03 16:38:34 +01:00
parent 3d5dbcb44a
commit a0d20935cc
23 changed files with 136 additions and 176 deletions

View file

@ -3,7 +3,6 @@ use crate::maybe_whole;
use rustc_errors::{PResult, Applicability, pluralize};
use syntax::ast::{self, QSelf, Path, PathSegment, Ident, ParenthesizedArgs, AngleBracketedArgs};
use syntax::ast::{AnonConst, GenericArg, AssocTyConstraint, AssocTyConstraintKind, BlockCheckMode};
use syntax::ThinVec;
use syntax::token::{self, Token};
use syntax_pos::source_map::{Span, BytePos};
use syntax_pos::symbol::{kw, sym};
@ -400,7 +399,7 @@ impl<'a> Parser<'a> {
// Parse const argument.
let expr = if let token::OpenDelim(token::Brace) = self.token.kind {
self.parse_block_expr(
None, self.token.span, BlockCheckMode::Default, ThinVec::new()
None, self.token.span, BlockCheckMode::Default, ast::AttrVec::new()
)?
} else if self.token.is_ident() {
// FIXME(const_generics): to distinguish between idents for types and consts,