Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust span of fn argument declaration #100458

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

compiler-errors
Copy link
Member

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 #99646 (comment)
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?

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 12, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 12, 2022
@compiler-errors compiler-errors changed the title Adjust span of fn arguments Adjust span of fn argument declaration Aug 12, 2022
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 15, 2022

📌 Commit 9b0edd0 has been approved by estebank

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 15, 2022
…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 rust-lang#99646 (comment)
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?
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2022
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#100031 (improve "try ignoring the field" diagnostic)
 - rust-lang#100325 (Rustdoc-Json: Don't remove impls for items imported from private modules)
 - rust-lang#100377 (Replace - with _ in fluent slugs to improve developer workflows)
 - rust-lang#100458 (Adjust span of fn argument declaration)
 - rust-lang#100514 (Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls)
 - rust-lang#100528 (Support 1st group of RISC-V Bitmanip backend target features)
 - rust-lang#100559 (Parser simplifications)
 - rust-lang#100568 (Fix STD build for ESP-IDF)
 - rust-lang#100582 ([rustdoc] Fix handling of stripped enum variant in JSON output format)
 - rust-lang#100586 (Reland changes replacing num_cpus with available_parallelism )

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e369ec8 into rust-lang:master Aug 15, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 15, 2022
@compiler-errors compiler-errors deleted the fn-argument-span branch August 11, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants