diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-07-07 11:52:14 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-09-08 19:18:22 +0200 |
| commit | 5de9bc73e76f60ee27c37f20d0a9530e5a957df7 (patch) | |
| tree | 961480a52d440fecdc3940204b5c53ff68de6052 /compiler/rustc_ast_passes | |
| parent | 2912efa879912b56f4676eaa3024382b040144f5 (diff) | |
| download | rust-5de9bc73e76f60ee27c37f20d0a9530e5a957df7.tar.gz rust-5de9bc73e76f60ee27c37f20d0a9530e5a957df7.zip | |
Refactor how to get the span of a function header
Diffstat (limited to 'compiler/rustc_ast_passes')
| -rw-r--r-- | compiler/rustc_ast_passes/src/ast_validation.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index bbba235a6d1..f425acda358 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -492,7 +492,7 @@ impl<'a> AstValidator<'a> { } if !spans.is_empty() { - let header_span = sig.header.span().unwrap_or(sig.span.shrink_to_lo()); + let header_span = sig.header_span(); let suggestion_span = header_span.shrink_to_hi().to(sig.decl.output.span()); let padding = if header_span.is_empty() { "" } else { " " }; |
