Skip to content

Only check #[allow(dead_code)] on the trait - #161932

Open
mu001999 wants to merge 1 commit into
rust-lang:mainfrom
mu001999-contrib:dead-code-refactor
Open

Only check #[allow(dead_code)] on the trait#161932
mu001999 wants to merge 1 commit into
rust-lang:mainfrom
mu001999-contrib:dead-code-refactor

Conversation

@mu001999

@mu001999 mu001999 commented Aug 28, 2026

Copy link
Copy Markdown
Member

I edited on an old branch (on another machine) when trying to resolve the first comment in #161571, and then force-pushed it. So it introduced the behavior in #157885 partially.

I found this when rebasing #157885, and I was expecting a conflict about this.

r? chenyukang

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 28, 2026
}
}

fn bar() {} //~ ERROR function `bar` is never used

@mu001999 mu001999 Aug 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This should success only after #157885.

View changes since the review

@chenyukang

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a9a7fbd has been approved by chenyukang

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: spurious failures

@rust-bors rust-bors Bot 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 Sep 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 8, 2026
…r, r=chenyukang

Only check `#[allow(dead_code)]` on the trait

I edited on an old branch (on another machine) when trying to resolve the first comment in rust-lang#161571, and then force-pushed it. So it introduced the behavior in rust-lang#157885 partially.

I found this when rebasing rust-lang#157885, and I was expecting a conflict about this.

r? chenyukang
rust-bors Bot pushed a commit that referenced this pull request Sep 8, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #162462 (Fix unsoundness in `VecDeque::from_iter(vec::IntoIter)`)
 - #162468 (mir_build: Rename `lower_let_expr` to `lower_fallible_let`, and clarify)
 - #161806 (Add tests and docs for `#[derive(GenericTypeVisitable)]`)
 - #161912 (run `extern "tail"` with `byval` argument test)
 - #161932 (Only check `#[allow(dead_code)]` on the trait)
 - #162236 (Call renumberMetadataForAssembly() in LLVMRustPrintModule())
 - #162435 (windows-gnu: document libgcc requirement)
 - #162439 (Update books)
 - #162451 (Add regression test for item-local diagnostic attribute lint levels)
 - #162455 (Update codegen-llvm/inline-debuginfo.rs for distinct DILocation)
 - #162459 (docs(time): replace "method" with "function")
 - #162465 (Fix my duplicate thanks entry)
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.

3 participants