Skip to content

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
@matthiaskrgr matthiaskrgr force-pushed the unused_lifetime_104432_fix branch from 718ebff to e5a17ec Compare February 3, 2023 19:57
…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 matthiaskrgr force-pushed the unused_lifetime_104432_fix branch from e5a17ec to a363703 Compare February 3, 2023 20:19
@matthiaskrgr
Copy link
Member Author

@bors reroll

@cjgillot
Copy link
Contributor

cjgillot commented Feb 9, 2023

@bors r+ rollup

@bors
Copy link
Collaborator

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
@matthiaskrgr matthiaskrgr deleted the unused_lifetime_104432_fix branch January 25, 2025 09:13
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