@@ -4,11 +4,10 @@ use rustc_data_structures::fx::FxHashSet;
44use rustc_errors:: { self , PResult , Applicability , DiagnosticBuilder , Handler , pluralize} ;
55use rustc_error_codes:: * ;
66use 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 } ;
88use syntax:: token:: { self , TokenKind , token_can_begin_expr} ;
99use syntax:: print:: pprust;
1010use syntax:: ptr:: P ;
11- use syntax:: ThinVec ;
1211use syntax:: util:: parser:: AssocOp ;
1312use syntax:: struct_span_err;
1413use syntax_pos:: symbol:: kw;
@@ -32,7 +31,7 @@ pub(super) fn dummy_arg(ident: Ident) -> Param {
3231 id : ast:: DUMMY_NODE_ID
3332 } ;
3433 Param {
35- attrs : ThinVec :: default ( ) ,
34+ attrs : AttrVec :: default ( ) ,
3635 id : ast:: DUMMY_NODE_ID ,
3736 pat,
3837 span : ident. span ,
@@ -164,7 +163,7 @@ impl RecoverQPath for Expr {
164163 Self {
165164 span : path. span ,
166165 kind : ExprKind :: Path ( qself, path) ,
167- attrs : ThinVec :: new ( ) ,
166+ attrs : AttrVec :: new ( ) ,
168167 id : ast:: DUMMY_NODE_ID ,
169168 }
170169 }
@@ -551,7 +550,7 @@ impl<'a> Parser<'a> {
551550 ) ;
552551
553552 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 ( ) ) ) )
555554 } ;
556555
557556 match lhs. kind {
@@ -974,7 +973,7 @@ impl<'a> Parser<'a> {
974973 & mut self ,
975974 lo : Span ,
976975 await_sp : Span ,
977- attrs : ThinVec < Attribute > ,
976+ attrs : AttrVec ,
978977 ) -> PResult < ' a , P < Expr > > {
979978 let ( hi, expr, is_question) = if self . token == token:: Not {
980979 // Handle `await!(<expr>)`.
@@ -1005,7 +1004,7 @@ impl<'a> Parser<'a> {
10051004 None ,
10061005 self . token . span ,
10071006 BlockCheckMode :: Default ,
1008- ThinVec :: new ( ) ,
1007+ AttrVec :: new ( ) ,
10091008 )
10101009 } else {
10111010 self . parse_expr ( )
@@ -1126,7 +1125,7 @@ impl<'a> Parser<'a> {
11261125 err. emit ( ) ;
11271126 // Recover from parse error, callers expect the closing delim to be consumed.
11281127 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 ( ) )
11301129 }
11311130 }
11321131 }
0 commit comments