File tree 4 files changed +5
-5
lines changed
compiler/rustc_parse/src/parser
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1395,7 +1395,7 @@ impl<'a> Parser<'a> {
1395
1395
/// so emit a proper diagnostic.
1396
1396
// Public for rustfmt usage.
1397
1397
pub fn parse_visibility ( & mut self , fbt : FollowedByType ) -> PResult < ' a , Visibility > {
1398
- maybe_whole ! ( self , NtVis , |x| x . into_inner( ) ) ;
1398
+ maybe_whole ! ( self , NtVis , |vis| vis . into_inner( ) ) ;
1399
1399
1400
1400
if !self . eat_keyword ( kw:: Pub ) {
1401
1401
// We need a span for our `Spanned<VisibilityKind>`, but there's inherently no
Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ impl<'a> Parser<'a> {
435
435
syntax_loc : Option < PatternLocation > ,
436
436
) -> PResult < ' a , P < Pat > > {
437
437
maybe_recover_from_interpolated_ty_qpath ! ( self , true ) ;
438
- maybe_whole ! ( self , NtPat , |x| x ) ;
438
+ maybe_whole ! ( self , NtPat , |pat| pat ) ;
439
439
440
440
let mut lo = self . token . span ;
441
441
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ impl<'a> Parser<'a> {
533
533
blk_mode : BlockCheckMode ,
534
534
can_be_struct_literal : bool ,
535
535
) -> PResult < ' a , ( AttrVec , P < Block > ) > {
536
- maybe_whole ! ( self , NtBlock , |x | ( AttrVec :: new( ) , x ) ) ;
536
+ maybe_whole ! ( self , NtBlock , |block | ( AttrVec :: new( ) , block ) ) ;
537
537
538
538
let maybe_ident = self . prev_token . clone ( ) ;
539
539
self . maybe_recover_unexpected_block_label ( ) ;
@@ -637,7 +637,7 @@ impl<'a> Parser<'a> {
637
637
recover : AttemptLocalParseRecovery ,
638
638
) -> PResult < ' a , Option < Stmt > > {
639
639
// Skip looking for a trailing semicolon when we have an interpolated statement.
640
- maybe_whole ! ( self , NtStmt , |x | Some ( x . into_inner( ) ) ) ;
640
+ maybe_whole ! ( self , NtStmt , |stmt | Some ( stmt . into_inner( ) ) ) ;
641
641
642
642
let Some ( mut stmt) = self . parse_stmt_without_recovery ( true , ForceCollect :: No ) ? else {
643
643
return Ok ( None ) ;
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ impl<'a> Parser<'a> {
250
250
) -> PResult < ' a , P < Ty > > {
251
251
let allow_qpath_recovery = recover_qpath == RecoverQPath :: Yes ;
252
252
maybe_recover_from_interpolated_ty_qpath ! ( self , allow_qpath_recovery) ;
253
- maybe_whole ! ( self , NtTy , |x| x ) ;
253
+ maybe_whole ! ( self , NtTy , |ty| ty ) ;
254
254
255
255
let lo = self . token . span ;
256
256
let mut impl_dyn_multi = false ;
You can’t perform that action at this time.
0 commit comments