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

unused-lifetimes: don't warn about lifetimes originating from expanded code #107648

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Feb 3, 2023

previously, we would warn like this:

warning: lifetime parameter `'s` never used
 --> /tmp/unusedlif/code.rs:6:62
  |
5 | #[derive(Clone)]
  |          - help: elide the unused lifetime
6 | struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As));
  |                                                              ^^
  |
  = note: requested on the command line with `-W unused-lifetimes`

Fixes #104432

@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2023

r? @Nilstrieb

(rustbot has picked a reviewer for you, use r? to override)

@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 Feb 3, 2023
…d code

previously, we would warn like this:

````
warning: lifetime parameter `'s` never used
 --> /tmp/unusedlif/code.rs:6:62
  |
5 | #[derive(Clone)]
  |          - help: elide the unused lifetime
6 | struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As));
  |                                                              ^^
  |
  = note: requested on the command line with `-W unused-lifetimes`
````

Fixes rust-lang#104432
@matthiaskrgr
Copy link
Member Author

@bors reroll

@cjgillot
Copy link
Contributor

cjgillot commented Feb 9, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 9, 2023

📌 Commit a363703 has been approved by cjgillot

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 Feb 9, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#107648 (unused-lifetimes: don't warn about lifetimes originating from expanded code)
 - rust-lang#107655 (rustdoc: use the same URL escape rules for fragments as for examples)
 - rust-lang#107659 (test: snapshot for derive suggestion in diff files)
 - rust-lang#107786 (Implement some tweaks in the new solver)
 - rust-lang#107803 (Do not bring trait alias supertraits into scope)
 - rust-lang#107815 (Disqualify `auto trait` built-in impl in new solver if explicit `impl` exists)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit be1789a into rust-lang:master Feb 9, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 9, 2023
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.

ICE: "Span must not be empty and have no suggestion" -Wunused-lifetimes
5 participants