fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.2 KiB147 linesraw
1error: this `impl` can be derived
2  --> $DIR/derivable_impls.rs:20:1
3   |
4LL | / impl std::default::Default for FooDefault<'_> {
5LL | |     fn default() -> Self {
6LL | |         Self {
7LL | |             a: false,
8...  |
9LL | |     }
10LL | | }
11   | |_^
12   |
13   = note: `-D clippy::derivable-impls` implied by `-D warnings`
14   = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]`
15   = help: remove the manual implementation...
16help: ...and instead derive it
17   |
18LL + #[derive(Default)]
19LL | struct FooDefault<'a> {
20   |
21
22error: this `impl` can be derived
23  --> $DIR/derivable_impls.rs:41:1
24   |
25LL | / impl std::default::Default for TupleDefault {
26LL | |     fn default() -> Self {
27LL | |         Self(false, 0, 0u64)
28LL | |     }
29LL | | }
30   | |_^
31   |
32   = help: remove the manual implementation...
33help: ...and instead derive it
34   |
35LL + #[derive(Default)]
36LL | struct TupleDefault(bool, i32, u64);
37   |
38
39error: this `impl` can be derived
40  --> $DIR/derivable_impls.rs:93:1
41   |
42LL | / impl Default for StrDefault<'_> {
43LL | |     fn default() -> Self {
44LL | |         Self("")
45LL | |     }
46LL | | }
47   | |_^
48   |
49   = help: remove the manual implementation...
50help: ...and instead derive it
51   |
52LL + #[derive(Default)]
53LL | struct StrDefault<'a>(&'a str);
54   |
55
56error: this `impl` can be derived
57  --> $DIR/derivable_impls.rs:119:1
58   |
59LL | / impl Default for Y {
60LL | |     fn default() -> Self {
61LL | |         Self(mac!())
62LL | |     }
63LL | | }
64   | |_^
65   |
66   = help: remove the manual implementation...
67help: ...and instead derive it
68   |
69LL + #[derive(Default)]
70LL | struct Y(u32);
71   |
72
73error: this `impl` can be derived
74  --> $DIR/derivable_impls.rs:158:1
75   |
76LL | / impl Default for WithoutSelfCurly {
77LL | |     fn default() -> Self {
78LL | |         WithoutSelfCurly { a: false }
79LL | |     }
80LL | | }
81   | |_^
82   |
83   = help: remove the manual implementation...
84help: ...and instead derive it
85   |
86LL + #[derive(Default)]
87LL | struct WithoutSelfCurly {
88   |
89
90error: this `impl` can be derived
91  --> $DIR/derivable_impls.rs:166:1
92   |
93LL | / impl Default for WithoutSelfParan {
94LL | |     fn default() -> Self {
95LL | |         WithoutSelfParan(false)
96LL | |     }
97LL | | }
98   | |_^
99   |
100   = help: remove the manual implementation...
101help: ...and instead derive it
102   |
103LL + #[derive(Default)]
104LL | struct WithoutSelfParan(bool);
105   |
106
107error: this `impl` can be derived
108  --> $DIR/derivable_impls.rs:216:1
109   |
110LL | / impl Default for RepeatDefault1 {
111LL | |     fn default() -> Self {
112LL | |         RepeatDefault1 { a: [0; 32] }
113LL | |     }
114LL | | }
115   | |_^
116   |
117   = help: remove the manual implementation...
118help: ...and instead derive it
119   |
120LL + #[derive(Default)]
121LL | pub struct RepeatDefault1 {
122   |
123
124error: this `impl` can be derived
125  --> $DIR/derivable_impls.rs:250:1
126   |
127LL | / impl Default for SimpleEnum {
128LL | |     fn default() -> Self {
129LL | |         SimpleEnum::Bar
130LL | |     }
131LL | | }
132   | |_^
133   |
134   = help: remove the manual implementation...
135help: ...and instead derive it...
136   |
137LL + #[derive(Default)]
138LL | pub enum SimpleEnum {
139   |
140help: ...and mark the default variant
141   |
142LL ~     #[default]
143LL ~     Bar,
144   |
145
146error: aborting due to 8 previous errors
147