This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 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> {
13951395 /// so emit a proper diagnostic.
13961396 // Public for rustfmt usage.
13971397 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( ) ) ;
13991399
14001400 if !self . eat_keyword ( kw:: Pub ) {
14011401 // 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> {
435435 syntax_loc : Option < PatternLocation > ,
436436 ) -> PResult < ' a , P < Pat > > {
437437 maybe_recover_from_interpolated_ty_qpath ! ( self , true ) ;
438- maybe_whole ! ( self , NtPat , |x| x ) ;
438+ maybe_whole ! ( self , NtPat , |pat| pat ) ;
439439
440440 let mut lo = self . token . span ;
441441
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ impl<'a> Parser<'a> {
533533 blk_mode : BlockCheckMode ,
534534 can_be_struct_literal : bool ,
535535 ) -> PResult < ' a , ( AttrVec , P < Block > ) > {
536- maybe_whole ! ( self , NtBlock , |x | ( AttrVec :: new( ) , x ) ) ;
536+ maybe_whole ! ( self , NtBlock , |block | ( AttrVec :: new( ) , block ) ) ;
537537
538538 let maybe_ident = self . prev_token . clone ( ) ;
539539 self . maybe_recover_unexpected_block_label ( ) ;
@@ -637,7 +637,7 @@ impl<'a> Parser<'a> {
637637 recover : AttemptLocalParseRecovery ,
638638 ) -> PResult < ' a , Option < Stmt > > {
639639 // 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( ) ) ) ;
641641
642642 let Some ( mut stmt) = self . parse_stmt_without_recovery ( true , ForceCollect :: No ) ? else {
643643 return Ok ( None ) ;
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ impl<'a> Parser<'a> {
250250 ) -> PResult < ' a , P < Ty > > {
251251 let allow_qpath_recovery = recover_qpath == RecoverQPath :: Yes ;
252252 maybe_recover_from_interpolated_ty_qpath ! ( self , allow_qpath_recovery) ;
253- maybe_whole ! ( self , NtTy , |x| x ) ;
253+ maybe_whole ! ( self , NtTy , |ty| ty ) ;
254254
255255 let lo = self . token . span ;
256256 let mut impl_dyn_multi = false ;
You can’t perform that action at this time.
0 commit comments