Skip to content

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

Merged
bors merged 4 commits into
rust-lang:masterfrom
Ezrashaw:combine-assoc-fns-dlint
Apr 13, 2023
Merged

dead-code-lint: de-dup multiple unused assoc functions#110277
bors merged 4 commits into
rust-lang:masterfrom
Ezrashaw:combine-assoc-fns-dlint

Conversation

@Ezrashaw

Copy link
Copy Markdown
Contributor

Fixes#109600

Prior art: #97853

@rustbot

Copy link
Copy Markdown
Collaborator

r? @lcnr

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

@rustbotrustbot 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

@lcnrlcnr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nits, then r=me

Comment threadcompiler/rustc_passes/src/dead.rs Outdated
Comment threadcompiler/rustc_passes/src/dead.rs Outdated
- remove unused (pun intentional) `continue`
- improve wording with assoc items in general
@Ezrashaw

Copy link
Copy Markdown
ContributorAuthor

@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

lcnr commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Apr 13, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 39e23ef has been approved by lcnr

It is now in the queue for this repository.

@borsbors 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
Copy Markdown
ContributorAuthor

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

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

@lcnr

lcnr commented Apr 13, 2023

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 13, 2023

Copy link
Copy Markdown
Collaborator

📌 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:masterApr 13, 2023
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@Ezrashaw@rustbot@lcnr@bors