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

dead-code-lint: de-dup multiple unused assoc functions #110277

Merged
merged 4 commits into from
Apr 13, 2023

Conversation

Ezrashaw
Copy link
Contributor

Fixes #109600

Prior art: #97853

@rustbot
Copy link
Collaborator

rustbot commented Apr 13, 2023

r? @lcnr

(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 Apr 13, 2023
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

nits, then r=me

compiler/rustc_passes/src/dead.rs Outdated Show resolved Hide resolved
compiler/rustc_passes/src/dead.rs Outdated Show resolved Hide resolved
- remove unused (pun intentional) `continue`
- improve wording with assoc items in general
@Ezrashaw
Copy link
Contributor Author

@lcnr Implemented.

Note that this lint only applies to inherent impls and therefore, associated types here are kind of useless without the incomplete inherent_associated_types feature.

@lcnr
Copy link
Contributor

lcnr commented Apr 13, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 13, 2023

📌 Commit 39e23ef has been approved by lcnr

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 13, 2023
@Ezrashaw
Copy link
Contributor Author

@lcnr Sorry, I forgot to bless a single test... dammit.

On the other hand, that test's output has objectively improved.

@lcnr
Copy link
Contributor

lcnr commented Apr 13, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Apr 13, 2023

📌 Commit 2bafc0f has been approved by lcnr

It is now in the queue for this repository.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#109036 (Fix diff option conflict in UI test)
 - rust-lang#110193 (Check for body owner fallibly in error reporting)
 - rust-lang#110233 (Make rust-intrinsic ABI unwindable)
 - rust-lang#110259 (Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented)
 - rust-lang#110265 (Automatically update the LLVM submodule for musl target (and other places))
 - rust-lang#110277 (dead-code-lint: de-dup multiple unused assoc functions)
 - rust-lang#110283 (Only emit alignment checks if we have a panic_impl)
 - rust-lang#110291 (Implement `Copy` for `LocationDetail`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 759d4e8 into rust-lang:master Apr 13, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 13, 2023
@Ezrashaw Ezrashaw deleted the combine-assoc-fns-dlint branch April 14, 2023 11:31
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.

Emit one warning when a struct has multiple unused associated functions
4 participants