about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-06 23:49:54 +0200
committerGitHub <noreply@github.com>2025-09-06 23:49:54 +0200
commitbb27a2b93d52bba1a5f4bf517948efdd588bf2cb (patch)
treedbdaa5265a8a5b30cd390c99047d35ce58936cca /compiler/rustc_query_impl/src
parent1123d49090e29ae2f4dd4131ababa9a41d45e637 (diff)
parenta641cfc6f37c9f4978b74e416a037c26dc3af7ac (diff)
downloadrust-bb27a2b93d52bba1a5f4bf517948efdd588bf2cb.tar.gz
rust-bb27a2b93d52bba1a5f4bf517948efdd588bf2cb.zip
Rollup merge of #146240 - hkBst:query-1, r=cjgillot
DynamicConfig: use canonical clone impl

Fixes clippy warning:
```text
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 }`
```
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs
index 306d4dbc4b4..e499e08c82b 100644
--- a/compiler/rustc_query_impl/src/lib.rs
+++ b/compiler/rustc_query_impl/src/lib.rs
@@ -58,7 +58,7 @@ impl<'tcx, C: QueryCache, const ANON: bool, const DEPTH_LIMIT: bool, const FEEDA
     for DynamicConfig<'tcx, C, ANON, DEPTH_LIMIT, FEEDABLE>
 {
     fn clone(&self) -> Self {
-        DynamicConfig { dynamic: self.dynamic }
+        *self
     }
 }