Skip to content

Conversation

@WhyNovaa
Copy link
Contributor

@WhyNovaa WhyNovaa commented Jan 6, 2026

This PR fixes an issue where the compiler would suggest adding #[derive(Trait)] even if the struct or enum already implements that trait manually.

Fixes #146515

@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 Jan 6, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 6, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 6, 2026
@WhyNovaa WhyNovaa force-pushed the diagnostics-impl-fix branch from e01da01 to 197a3ea Compare January 6, 2026 09:02
@rustbot

This comment has been minimized.

@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 6, 2026
@rust-log-analyzer

This comment has been minimized.

@WhyNovaa WhyNovaa force-pushed the diagnostics-impl-fix branch from 197a3ea to 91788da Compare January 6, 2026 09:11
@WhyNovaa
Copy link
Contributor Author

WhyNovaa commented Jan 6, 2026

r? @BoxyUwU

@rustbot rustbot assigned BoxyUwU and unassigned jieyouxu Jan 6, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 6, 2026

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@Kivooeo Kivooeo assigned Kivooeo and unassigned BoxyUwU Jan 6, 2026
@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Jan 14, 2026

r? @lcnr

will get to it later this week/start of next

@rustbot rustbot assigned lcnr and unassigned Kivooeo Jan 14, 2026
@rust-log-analyzer

This comment has been minimized.

@fmease
Copy link
Member

fmease commented Jan 18, 2026

CC'ing brand new PR #151278 for visibility. It attempts to address a related issue. We might or might not be able to share the "core logic" between these two diagnostics (disclaimer: I've only skimmed both PRs, so I might be entirely wrong).

@WhyNovaa
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 20, 2026
@rust-bors

This comment has been minimized.

@lcnr lcnr changed the title Diagnostics impl fix Do not suggest derive if there is already an impl Jan 27, 2026
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.

@WhyNovaa WhyNovaa force-pushed the diagnostics-impl-fix branch from ba92274 to bd3503d Compare January 28, 2026 09:07
@rustbot

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 28, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 28, 2026
@rust-log-analyzer

This comment has been minimized.

@WhyNovaa WhyNovaa force-pushed the diagnostics-impl-fix branch from daeb392 to 7a4b3ed Compare January 28, 2026 09:33
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 28, 2026
@WhyNovaa WhyNovaa force-pushed the diagnostics-impl-fix branch from 7a4b3ed to 11ae531 Compare January 28, 2026 09:39
@lcnr
Copy link
Contributor

lcnr commented Jan 28, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 28, 2026

📌 Commit 11ae531 has been approved by lcnr

It is now in the queue for this repository.

@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 Jan 28, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 28, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #150491 (resolve: Mark items under exported ambiguous imports as exported)
 - #150720 (Do not suggest `derive` if there is already an impl)
 - #150968 (compiler-builtins: Remove the no-f16-f128 feature)
 - #151493 ([RFC] rustc_parse: improve the error diagnostic for "missing let in let chain")
 - #151660 (Bump `std`'s `backtrace`'s `rustc-demangle`)
 - #151696 (Borrowck: Simplify SCC annotation computation, placeholder rewriting)
 - #151704 (Implement `set_output_kind` for Emscripten linker)
 - #151706 (Remove Fuchsia from target OS list in unix.rs for sleep)
 - #151769 (fix undefined behavior in VecDeque::splice)
 - #151779 (stdarch subtree update)
 - #151449 ([rustdoc] Add regression test for #151411)
 - #151773 (clean up checks for constant promotion of integer division/remainder operations)
@rust-bors rust-bors bot merged commit 3787595 into rust-lang:main Jan 29, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 29, 2026
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Jan 29, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#150491 (resolve: Mark items under exported ambiguous imports as exported)
 - rust-lang/rust#150720 (Do not suggest `derive` if there is already an impl)
 - rust-lang/rust#150968 (compiler-builtins: Remove the no-f16-f128 feature)
 - rust-lang/rust#151493 ([RFC] rustc_parse: improve the error diagnostic for "missing let in let chain")
 - rust-lang/rust#151660 (Bump `std`'s `backtrace`'s `rustc-demangle`)
 - rust-lang/rust#151696 (Borrowck: Simplify SCC annotation computation, placeholder rewriting)
 - rust-lang/rust#151704 (Implement `set_output_kind` for Emscripten linker)
 - rust-lang/rust#151706 (Remove Fuchsia from target OS list in unix.rs for sleep)
 - rust-lang/rust#151769 (fix undefined behavior in VecDeque::splice)
 - rust-lang/rust#151779 (stdarch subtree update)
 - rust-lang/rust#151449 ([rustdoc] Add regression test for rust-lang/rust#151411)
 - rust-lang/rust#151773 (clean up checks for constant promotion of integer division/remainder operations)
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.

incorrect "consider annotating ContainsRc<T> with #[derive(Clone)]"

8 participants