]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/new_without_default.stderr
New upstream version 1.53.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / new_without_default.stderr
1 error: you should consider adding a `Default` implementation for `Foo`
2 --> $DIR/new_without_default.rs:8:5
3 |
4 LL | / pub fn new() -> Foo {
5 LL | | Foo
6 LL | | }
7 | |_____^
8 |
9 = note: `-D clippy::new-without-default` implied by `-D warnings`
10 help: try this
11 |
12 LL | impl Default for Foo {
13 LL | fn default() -> Self {
14 LL | Self::new()
15 LL | }
16 LL | }
17 |
18
19 error: you should consider adding a `Default` implementation for `Bar`
20 --> $DIR/new_without_default.rs:16:5
21 |
22 LL | / pub fn new() -> Self {
23 LL | | Bar
24 LL | | }
25 | |_____^
26 |
27 help: try this
28 |
29 LL | impl Default for Bar {
30 LL | fn default() -> Self {
31 LL | Self::new()
32 LL | }
33 LL | }
34 |
35
36 error: you should consider adding a `Default` implementation for `LtKo<'c>`
37 --> $DIR/new_without_default.rs:80:5
38 |
39 LL | / pub fn new() -> LtKo<'c> {
40 LL | | unimplemented!()
41 LL | | }
42 | |_____^
43 |
44 help: try this
45 |
46 LL | impl<'c> Default for LtKo<'c> {
47 LL | fn default() -> Self {
48 LL | Self::new()
49 LL | }
50 LL | }
51 |
52
53 error: you should consider adding a `Default` implementation for `NewNotEqualToDerive`
54 --> $DIR/new_without_default.rs:157:5
55 |
56 LL | / pub fn new() -> Self {
57 LL | | NewNotEqualToDerive { foo: 1 }
58 LL | | }
59 | |_____^
60 |
61 help: try this
62 |
63 LL | impl Default for NewNotEqualToDerive {
64 LL | fn default() -> Self {
65 LL | Self::new()
66 LL | }
67 LL | }
68 |
69
70 error: you should consider adding a `Default` implementation for `FooGenerics<T>`
71 --> $DIR/new_without_default.rs:165:5
72 |
73 LL | / pub fn new() -> Self {
74 LL | | Self(Default::default())
75 LL | | }
76 | |_____^
77 |
78 help: try this
79 |
80 LL | impl<T> Default for FooGenerics<T> {
81 LL | fn default() -> Self {
82 LL | Self::new()
83 LL | }
84 LL | }
85 |
86
87 error: you should consider adding a `Default` implementation for `BarGenerics<T>`
88 --> $DIR/new_without_default.rs:172:5
89 |
90 LL | / pub fn new() -> Self {
91 LL | | Self(Default::default())
92 LL | | }
93 | |_____^
94 |
95 help: try this
96 |
97 LL | impl<T: Copy> Default for BarGenerics<T> {
98 LL | fn default() -> Self {
99 LL | Self::new()
100 LL | }
101 LL | }
102 |
103
104 error: aborting due to 6 previous errors
105