Skip to content

Conversation

LittleFall
Copy link
Contributor

@LittleFall LittleFall commented Feb 19, 2023

Fixes #96956.

Some changes are ported from #98079, thanks to jeremydavis519.

r? @estebank @petrochenkov

Any feedback is appreciated!

Actions

  • resolve conflicts
  • fix build
  • address review comments in last pr
  • update tests

@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon.

Please see the contribution instructions for more information.

@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 19, 2023
@LittleFall LittleFall changed the title Define the named_static_lifetimes lint Convert a hard-warning about named static lifetimes into lint "unused_lifetimes" Feb 19, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot assigned estebank and unassigned jackh726 Feb 20, 2023
@LittleFall LittleFall marked this pull request as ready for review February 20, 2023 07:28
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 21, 2023

📌 Commit 5fb9c8b 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 Feb 21, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Feb 21, 2023
…bank

Convert a hard-warning about named static lifetimes into lint "unused_lifetimes"

Fixes rust-lang#96956.

Some changes are ported from rust-lang#98079, thanks to jeremydavis519.

r? `@estebank` `@petrochenkov`

Any feedback is appreciated!

## Actions
- [x] resolve conflicts
- [x] fix build
- [x] address review comments in last pr
- [x] update tests
@compiler-errors
Copy link
Member

compiler-errors commented Feb 21, 2023

@bors r-

Can you squash these into one commit? The presence of 17a7ccc is a bit disorienting to the commit history. Thanks!

For context, we don't allow merge commits in the history: https://github.com/rust-lang/rustc-dev-guide/blob/master/src/git.md#keeping-things-up-to-date

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 21, 2023
…_lifetimes"

Define the `named_static_lifetimes` lint

This lint will replace the existing hard-warning.

Replace the named static lifetime hard-warning with the new lint

Update the UI tests for the `named_static_lifetimes` lint

Remove the direct dependency on `rustc_lint_defs`

fix build

Signed-off-by: Zhi Qi <qizhi@pingcap.com>

use "UNUSED_LIFETIMES" instead

Signed-off-by: Zhi Qi <qizhi@pingcap.com>

update 1 test and fix typo

Signed-off-by: Zhi Qi <qizhi@pingcap.com>

update tests

Signed-off-by: Zhi Qi <qizhi@pingcap.com>

fix tests: add extra blank line

Signed-off-by: Zhi Qi <qizhi@pingcap.com>
@LittleFall
Copy link
Contributor Author

LittleFall commented Feb 22, 2023

@bors r-

Can you squash these into one commit? The presence of 17a7ccc is a bit disorienting to the commit history. Thanks!

For context, we don't allow merge commits in the history: https://github.com/rust-lang/rustc-dev-guide/blob/master/src/git.md#keeping-things-up-to-date

Got and done. I have cherry-picked actual commits and squashed them into single.

r? @compiler-errors

@rustbot rustbot assigned compiler-errors and unassigned estebank Feb 22, 2023
@compiler-errors
Copy link
Member

Thank you, sorry for the inconvenience.

@bors r=estebank

@bors
Copy link
Collaborator

bors commented Feb 22, 2023

📌 Commit ce2ae62 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 22, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2023
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#108110 (Move some `InferCtxt` methods to `EvalCtxt` in new solver)
 - rust-lang#108168 (Fix ICE on type alias in recursion)
 - rust-lang#108230 (Convert a hard-warning about named static lifetimes into lint "unused_lifetimes")
 - rust-lang#108239 (Fix overlapping spans in removing extra arguments)
 - rust-lang#108246 (Add an InstCombine for redundant casts)
 - rust-lang#108264 (no-fail-fast support for tool testsuites)
 - rust-lang#108310 (rustdoc: Fix duplicated attributes for first reexport)
 - rust-lang#108318 (Remove unused FileDesc::get_cloexec)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a32c500 into rust-lang:master Feb 22, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 22, 2023
@LittleFall LittleFall deleted the enhance/warning branch February 22, 2023 15:46
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.

"warning: unnecessary lifetime parameter" unsilenceable lint
7 participants