]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/derive.stderr
iterate List by value
[rust.git] / tests / ui / derive.stderr
index 25d59bdb7da9a01589756a83639d1aa8266aca41..1328a9b31077e0182722c3b1c4479cfd138728e6 100644 (file)
@@ -1,91 +1,83 @@
-error: you are deriving `Hash` but have implemented `PartialEq` explicitly
-  --> $DIR/derive.rs:18:10
-   |
-18 | #[derive(Hash)]
-   |          ^^^^
-   |
-   = note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)]
-note: lint level defined here
-  --> $DIR/derive.rs:6:9
-   |
-6  | #![deny(warnings)]
-   |         ^^^^^^^^
-note: `PartialEq` implemented here
-  --> $DIR/derive.rs:21:1
+error: you are implementing `Clone` explicitly on a `Copy` type
+  --> $DIR/derive.rs:8:1
    |
-21 | / impl PartialEq for Bar {
-22 | |     fn eq(&self, _: &Bar) -> bool { true }
-23 | | }
+LL | / impl Clone for Qux {
+LL | |     fn clone(&self) -> Self {
+LL | |         Qux
+LL | |     }
+LL | | }
    | |_^
-
-error: you are deriving `Hash` but have implemented `PartialEq` explicitly
-  --> $DIR/derive.rs:25:10
-   |
-25 | #[derive(Hash)]
-   |          ^^^^
    |
-   = note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)]
-note: `PartialEq` implemented here
-  --> $DIR/derive.rs:28:1
+   = note: `-D clippy::expl-impl-clone-on-copy` implied by `-D warnings`
+note: consider deriving `Clone` or removing `Copy`
+  --> $DIR/derive.rs:8:1
    |
-28 | / impl PartialEq<Baz> for Baz {
-29 | |     fn eq(&self, _: &Baz) -> bool { true }
-30 | | }
+LL | / impl Clone for Qux {
+LL | |     fn clone(&self) -> Self {
+LL | |         Qux
+LL | |     }
+LL | | }
    | |_^
 
-error: you are implementing `Hash` explicitly but have derived `PartialEq`
-  --> $DIR/derive.rs:35:1
+error: you are implementing `Clone` explicitly on a `Copy` type
+  --> $DIR/derive.rs:32:1
    |
-35 | / impl Hash for Bah {
-36 | |     fn hash<H: Hasher>(&self, _: &mut H) {}
-37 | | }
+LL | / impl<'a> Clone for Lt<'a> {
+LL | |     fn clone(&self) -> Self {
+LL | |         unimplemented!()
+LL | |     }
+LL | | }
    | |_^
    |
-   = note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)]
-note: `PartialEq` implemented here
-  --> $DIR/derive.rs:32:10
+note: consider deriving `Clone` or removing `Copy`
+  --> $DIR/derive.rs:32:1
    |
-32 | #[derive(PartialEq)]
-   |          ^^^^^^^^^
+LL | / impl<'a> Clone for Lt<'a> {
+LL | |     fn clone(&self) -> Self {
+LL | |         unimplemented!()
+LL | |     }
+LL | | }
+   | |_^
 
 error: you are implementing `Clone` explicitly on a `Copy` type
-  --> $DIR/derive.rs:42:1
+  --> $DIR/derive.rs:44:1
    |
-42 | / impl Clone for Qux {
-43 | |     fn clone(&self) -> Self { Qux }
-44 | | }
+LL | / impl Clone for BigArray {
+LL | |     fn clone(&self) -> Self {
+LL | |         unimplemented!()
+LL | |     }
+LL | | }
    | |_^
    |
-   = note: #[deny(expl_impl_clone_on_copy)] implied by #[deny(warnings)]
-note: lint level defined here
-  --> $DIR/derive.rs:6:9
-   |
-6  | #![deny(warnings)]
-   |         ^^^^^^^^
 note: consider deriving `Clone` or removing `Copy`
-  --> $DIR/derive.rs:42:1
+  --> $DIR/derive.rs:44:1
    |
-42 | / impl Clone for Qux {
-43 | |     fn clone(&self) -> Self { Qux }
-44 | | }
+LL | / impl Clone for BigArray {
+LL | |     fn clone(&self) -> Self {
+LL | |         unimplemented!()
+LL | |     }
+LL | | }
    | |_^
 
 error: you are implementing `Clone` explicitly on a `Copy` type
-  --> $DIR/derive.rs:66:1
+  --> $DIR/derive.rs:56:1
    |
-66 | / impl<'a> Clone for Lt<'a> {
-67 | |     fn clone(&self) -> Self { unimplemented!() }
-68 | | }
+LL | / impl Clone for FnPtr {
+LL | |     fn clone(&self) -> Self {
+LL | |         unimplemented!()
+LL | |     }
+LL | | }
    | |_^
    |
-   = note: #[deny(expl_impl_clone_on_copy)] implied by #[deny(warnings)]
 note: consider deriving `Clone` or removing `Copy`
-  --> $DIR/derive.rs:66:1
+  --> $DIR/derive.rs:56:1
    |
-66 | / impl<'a> Clone for Lt<'a> {
-67 | |     fn clone(&self) -> Self { unimplemented!() }
-68 | | }
+LL | / impl Clone for FnPtr {
+LL | |     fn clone(&self) -> Self {
+LL | |         unimplemented!()
+LL | |     }
+LL | | }
    | |_^
 
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors