Skip to content

Conversation

hkBst
Copy link
Member

@hkBst hkBst commented Sep 5, 2025

Fixes clippy warning:

warning: non-canonical implementation of `clone` on a `Copy` type
  --> compiler/rustc_query_impl/src/lib.rs:60:29
   |
60 |       fn clone(&self) -> Self {
   |  _____________________________^
61 | |         DynamicConfig { dynamic: self.dynamic }
62 | |     }
   | |_____^ help: change this to: `{ *self }`

@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
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

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Sep 5, 2025
@hkBst
Copy link
Member Author

hkBst commented Sep 5, 2025

I tried changing the manual Copy and Clone impls to a derive clause, but that ends up causing lots of unsatisfied trait bounds. I don't understand why that does not work. The single shared reference member should impl Copy, and the automatically derived impls should be identical to the manual impls AFAICT. Apparently I'm wrong about this somehow. Would love to understand!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants