@@ -4,11 +4,10 @@ use rustc_data_structures::fx::FxHashSet;
4
4
use rustc_errors:: { self , PResult , Applicability , DiagnosticBuilder , Handler , pluralize} ;
5
5
use rustc_error_codes:: * ;
6
6
use syntax:: ast:: { self , Param , BinOpKind , BindingMode , BlockCheckMode , Expr , ExprKind , Ident , Item } ;
7
- use syntax:: ast:: { ItemKind , Mutability , Pat , PatKind , PathSegment , QSelf , Ty , TyKind , Attribute } ;
7
+ use syntax:: ast:: { ItemKind , Mutability , Pat , PatKind , PathSegment , QSelf , Ty , TyKind , AttrVec } ;
8
8
use syntax:: token:: { self , TokenKind , token_can_begin_expr} ;
9
9
use syntax:: print:: pprust;
10
10
use syntax:: ptr:: P ;
11
- use syntax:: ThinVec ;
12
11
use syntax:: util:: parser:: AssocOp ;
13
12
use syntax:: struct_span_err;
14
13
use syntax_pos:: symbol:: kw;
@@ -32,7 +31,7 @@ pub(super) fn dummy_arg(ident: Ident) -> Param {
32
31
id : ast:: DUMMY_NODE_ID
33
32
} ;
34
33
Param {
35
- attrs : ThinVec :: default ( ) ,
34
+ attrs : AttrVec :: default ( ) ,
36
35
id : ast:: DUMMY_NODE_ID ,
37
36
pat,
38
37
span : ident. span ,
@@ -164,7 +163,7 @@ impl RecoverQPath for Expr {
164
163
Self {
165
164
span : path. span ,
166
165
kind : ExprKind :: Path ( qself, path) ,
167
- attrs : ThinVec :: new ( ) ,
166
+ attrs : AttrVec :: new ( ) ,
168
167
id : ast:: DUMMY_NODE_ID ,
169
168
}
170
169
}
@@ -551,7 +550,7 @@ impl<'a> Parser<'a> {
551
550
) ;
552
551
553
552
let mk_err_expr = |this : & Self , span| {
554
- Ok ( Some ( this. mk_expr ( span, ExprKind :: Err , ThinVec :: new ( ) ) ) )
553
+ Ok ( Some ( this. mk_expr ( span, ExprKind :: Err , AttrVec :: new ( ) ) ) )
555
554
} ;
556
555
557
556
match lhs. kind {
@@ -974,7 +973,7 @@ impl<'a> Parser<'a> {
974
973
& mut self ,
975
974
lo : Span ,
976
975
await_sp : Span ,
977
- attrs : ThinVec < Attribute > ,
976
+ attrs : AttrVec ,
978
977
) -> PResult < ' a , P < Expr > > {
979
978
let ( hi, expr, is_question) = if self . token == token:: Not {
980
979
// Handle `await!(<expr>)`.
@@ -1005,7 +1004,7 @@ impl<'a> Parser<'a> {
1005
1004
None ,
1006
1005
self . token . span ,
1007
1006
BlockCheckMode :: Default ,
1008
- ThinVec :: new ( ) ,
1007
+ AttrVec :: new ( ) ,
1009
1008
)
1010
1009
} else {
1011
1010
self . parse_expr ( )
@@ -1126,7 +1125,7 @@ impl<'a> Parser<'a> {
1126
1125
err. emit ( ) ;
1127
1126
// Recover from parse error, callers expect the closing delim to be consumed.
1128
1127
self . consume_block ( delim, ConsumeClosingDelim :: Yes ) ;
1129
- self . mk_expr ( lo. to ( self . prev_span ) , ExprKind :: Err , ThinVec :: new ( ) )
1128
+ self . mk_expr ( lo. to ( self . prev_span ) , ExprKind :: Err , AttrVec :: new ( ) )
1130
1129
}
1131
1130
}
1132
1131
}
0 commit comments