clean tests/ui/derive.rs

Cleaning the empty lines for clarity.
This commit is contained in:
Luis de Bethencourt 2017-05-11 11:11:00 +01:00
parent e2cce4809b
commit e3aa074033
2 changed files with 32 additions and 42 deletions

View file

@ -16,7 +16,6 @@ impl PartialEq<u64> for Foo {
} }
#[derive(Hash)] #[derive(Hash)]
struct Bar; struct Bar;
impl PartialEq for Bar { impl PartialEq for Bar {
@ -24,7 +23,6 @@ impl PartialEq for Bar {
} }
#[derive(Hash)] #[derive(Hash)]
struct Baz; struct Baz;
impl PartialEq<Baz> for Baz { impl PartialEq<Baz> for Baz {
@ -35,7 +33,6 @@ impl PartialEq<Baz> for Baz {
struct Bah; struct Bah;
impl Hash for Bah { impl Hash for Bah {
fn hash<H: Hasher>(&self, _: &mut H) {} fn hash<H: Hasher>(&self, _: &mut H) {}
} }
@ -43,7 +40,6 @@ impl Hash for Bah {
struct Qux; struct Qux;
impl Clone for Qux { impl Clone for Qux {
fn clone(&self) -> Self { Qux } fn clone(&self) -> Self { Qux }
} }
@ -68,7 +64,6 @@ struct Lt<'a> {
} }
impl<'a> Clone for Lt<'a> { impl<'a> Clone for Lt<'a> {
fn clone(&self) -> Self { unimplemented!() } fn clone(&self) -> Self { unimplemented!() }
} }

View file

@ -11,51 +11,49 @@ note: lint level defined here
6 | #![deny(warnings)] 6 | #![deny(warnings)]
| ^^^^^^^^ | ^^^^^^^^
note: `PartialEq` implemented here note: `PartialEq` implemented here
--> $DIR/derive.rs:22:1 --> $DIR/derive.rs:21:1
| |
22 | / impl PartialEq for Bar { 21 | / impl PartialEq for Bar {
23 | | fn eq(&self, _: &Bar) -> bool { true } 22 | | fn eq(&self, _: &Bar) -> bool { true }
24 | | } 23 | | }
| |_^ | |_^
error: you are deriving `Hash` but have implemented `PartialEq` explicitly error: you are deriving `Hash` but have implemented `PartialEq` explicitly
--> $DIR/derive.rs:26:10 --> $DIR/derive.rs:25:10
| |
26 | #[derive(Hash)] 25 | #[derive(Hash)]
| ^^^^ | ^^^^
| |
= note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)] = note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)]
note: `PartialEq` implemented here note: `PartialEq` implemented here
--> $DIR/derive.rs:30:1 --> $DIR/derive.rs:28:1
| |
30 | / impl PartialEq<Baz> for Baz { 28 | / impl PartialEq<Baz> for Baz {
31 | | fn eq(&self, _: &Baz) -> bool { true } 29 | | fn eq(&self, _: &Baz) -> bool { true }
32 | | } 30 | | }
| |_^ | |_^
error: you are implementing `Hash` explicitly but have derived `PartialEq` error: you are implementing `Hash` explicitly but have derived `PartialEq`
--> $DIR/derive.rs:37:1 --> $DIR/derive.rs:35:1
| |
37 | / impl Hash for Bah { 35 | / impl Hash for Bah {
38 | | 36 | | fn hash<H: Hasher>(&self, _: &mut H) {}
39 | | fn hash<H: Hasher>(&self, _: &mut H) {} 37 | | }
40 | | }
| |_^ | |_^
| |
= note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)] = note: #[deny(derive_hash_xor_eq)] implied by #[deny(warnings)]
note: `PartialEq` implemented here note: `PartialEq` implemented here
--> $DIR/derive.rs:34:10 --> $DIR/derive.rs:32:10
| |
34 | #[derive(PartialEq)] 32 | #[derive(PartialEq)]
| ^^^^^^^^^ | ^^^^^^^^^
error: you are implementing `Clone` explicitly on a `Copy` type error: you are implementing `Clone` explicitly on a `Copy` type
--> $DIR/derive.rs:45:1 --> $DIR/derive.rs:42:1
| |
45 | / impl Clone for Qux { 42 | / impl Clone for Qux {
46 | | 43 | | fn clone(&self) -> Self { Qux }
47 | | fn clone(&self) -> Self { Qux } 44 | | }
48 | | }
| |_^ | |_^
| |
= note: #[deny(expl_impl_clone_on_copy)] implied by #[deny(warnings)] = note: #[deny(expl_impl_clone_on_copy)] implied by #[deny(warnings)]
@ -65,31 +63,28 @@ note: lint level defined here
6 | #![deny(warnings)] 6 | #![deny(warnings)]
| ^^^^^^^^ | ^^^^^^^^
note: consider deriving `Clone` or removing `Copy` note: consider deriving `Clone` or removing `Copy`
--> $DIR/derive.rs:45:1 --> $DIR/derive.rs:42:1
| |
45 | / impl Clone for Qux { 42 | / impl Clone for Qux {
46 | | 43 | | fn clone(&self) -> Self { Qux }
47 | | fn clone(&self) -> Self { Qux } 44 | | }
48 | | }
| |_^ | |_^
error: you are implementing `Clone` explicitly on a `Copy` type error: you are implementing `Clone` explicitly on a `Copy` type
--> $DIR/derive.rs:70:1 --> $DIR/derive.rs:66:1
| |
70 | / impl<'a> Clone for Lt<'a> { 66 | / impl<'a> Clone for Lt<'a> {
71 | | 67 | | fn clone(&self) -> Self { unimplemented!() }
72 | | fn clone(&self) -> Self { unimplemented!() } 68 | | }
73 | | }
| |_^ | |_^
| |
= note: #[deny(expl_impl_clone_on_copy)] implied by #[deny(warnings)] = note: #[deny(expl_impl_clone_on_copy)] implied by #[deny(warnings)]
note: consider deriving `Clone` or removing `Copy` note: consider deriving `Clone` or removing `Copy`
--> $DIR/derive.rs:70:1 --> $DIR/derive.rs:66:1
| |
70 | / impl<'a> Clone for Lt<'a> { 66 | / impl<'a> Clone for Lt<'a> {
71 | | 67 | | fn clone(&self) -> Self { unimplemented!() }
72 | | fn clone(&self) -> Self { unimplemented!() } 68 | | }
73 | | }
| |_^ | |_^
error: aborting due to 5 previous errors error: aborting due to 5 previous errors