Rollup merge of #100458 - compiler-errors:fn-argument-span, r=estebank
Adjust span of fn argument declaration Span of a fn argument declaration goes from: ``` fn foo(i : i32 , ...) ^^^^^^^^ ``` to: ``` fn foo(i : i32 , ...) ^^^^^^^ ``` That is, we don't include the extra spacing up to the trailing comma, which I think is more correct. cc https://github.com/rust-lang/rust/pull/99646#discussion_r944568074 r? ``@estebank`` --- The two tests that had dramatic changes in their rendering I think actually are improved, though they are kinda poor spans both before and after the changes. 🤷 Thoughts?
This commit is contained in:
commit
e369ec871e
5 changed files with 15 additions and 21 deletions
|
@ -2338,7 +2338,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
};
|
||||
|
||||
let span = lo.until(this.token.span);
|
||||
let span = lo.to(this.prev_token.span);
|
||||
|
||||
Ok((
|
||||
Param {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue