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

Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params #124198

Merged
merged 2 commits into from Apr 21, 2024

Conversation

compiler-errors
Copy link
Member

Make the primary span point to the opaque, rather than the param which might be very far away (e.g. in an impl header hundreds of lines above).

@rustbot
Copy link
Collaborator

rustbot commented Apr 20, 2024

r? @Nadrieril

rustbot has assigned @Nadrieril.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 20, 2024
|
LL | trait Foo {
| ^^^^^^^^^
LL |
| --------- type parameter is implicitly captured by this `impl Trait`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be "Self parameter is implicitly captured" instead?

Copy link
Member

@Nadrieril Nadrieril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. r=me with or without the suggested change.

@Nadrieril
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 21, 2024

📌 Commit 57085a0 has been approved by Nadrieril

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 Apr 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2024
…llaumeGomez

Rollup of 4 pull requests

Successful merges:

 - rust-lang#124069 (enable clippy for bootstrap on CI PRs (in `mingw-check` image))
 - rust-lang#124089 (Fix watchOS and visionOS for pread64 and pwrite64 calls)
 - rust-lang#124184 (Suggest using `unsigned_abs` in `abs` documentation)
 - rust-lang#124198 (Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 43d5e00 into rust-lang:master Apr 21, 2024
12 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2024
Rollup merge of rust-lang#124198 - compiler-errors:improve-ty-ct-param-span, r=Nadrieril

Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params

Make the primary span point to the opaque, rather than the param which might be very far away (e.g. in an impl header hundreds of lines above).
@rustbot rustbot added this to the 1.79.0 milestone Apr 21, 2024
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.

None yet

4 participants