We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e90c1f6 commit 95183ecCopy full SHA for 95183ec
compiler/rustc_passes/src/dead.rs
@@ -268,6 +268,11 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
268
}
269
return true;
270
271
+
272
+ // ignore generated `DerivedClone` but do not expose this to users.
273
+ if Some(trait_of) == self.tcx.get_diagnostic_item(sym::DerivedClone) {
274
+ return true;
275
+ }
276
277
278
library/core/src/clone.rs
@@ -178,6 +178,7 @@ pub struct AssertParamIsCopy<T: Copy + ?Sized> {
178
reason = "deriving hack, should not be public",
179
issue = "none"
180
)]
181
+#[rustc_diagnostic_item = "DerivedClone"]
182
pub trait DerivedClone: Sized {
183
fn clone(&self) -> Self;
184
0 commit comments