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.
TrivialClone
#[marker]
1 parent 3fc578b commit bc70836Copy full SHA for bc70836
core/src/clone.rs
@@ -275,6 +275,10 @@ pub const trait Clone: Sized {
275
// its invariant holds whenever `Clone` is implemented, even if the actual
276
// `TrivialClone` bound would not be satisfied because of lifetime bounds.
277
#[rustc_unsafe_specialization_marker]
278
+// If `#[derive(Clone, Clone, Copy)]` is written, there will be multiple
279
+// implementations of `TrivialClone`. To keep it from appearing in error
280
+// messages, make it a `#[marker]` trait.
281
+#[marker]
282
pub const unsafe trait TrivialClone: [const] Clone {}
283
284
/// Derive macro generating an impl of the trait `Clone`.
0 commit comments