@@ -8423,6 +8423,8 @@ impl<'a> Parser<'a> {
84238423 for ( index, input) in decl. inputs . iter_mut ( ) . enumerate ( ) {
84248424 let id = ast:: DUMMY_NODE_ID ;
84258425 let span = input. pat . span ;
8426+ let desugared_span = self . sess . source_map ( )
8427+ . mark_span_with_reason ( CompilerDesugaringKind :: Async , span, None ) ;
84268428
84278429 // Construct a name for our temporary argument.
84288430 let name = format ! ( "__arg{}" , index) ;
@@ -8439,8 +8441,7 @@ impl<'a> Parser<'a> {
84398441 // this would affect the input to procedural macros, but they can have
84408442 // their span marked as being the result of a compiler desugaring so
84418443 // that they aren't linted against.
8442- input. pat . span = self . sess . source_map ( ) . mark_span_with_reason (
8443- CompilerDesugaringKind :: Async , span, None ) ;
8444+ input. pat . span = desugared_span;
84448445
84458446 ( binding_mode, ident, true )
84468447 }
@@ -8460,7 +8461,7 @@ impl<'a> Parser<'a> {
84608461 node : PatKind :: Ident (
84618462 BindingMode :: ByValue ( Mutability :: Immutable ) , ident, None ,
84628463 ) ,
8463- span,
8464+ span : desugared_span ,
84648465 } ) ,
84658466 source : ArgSource :: AsyncFn ( input. pat . clone ( ) ) ,
84668467 } )
@@ -8473,7 +8474,7 @@ impl<'a> Parser<'a> {
84738474 pat : P ( Pat {
84748475 id,
84758476 node : PatKind :: Ident ( binding_mode, ident, None ) ,
8476- span,
8477+ span : desugared_span ,
84778478 } ) ,
84788479 // We explicitly do not specify the type for this statement. When the user's
84798480 // argument type is `impl Trait` then this would require the
0 commit comments