]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/new_without_default.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / new_without_default.stderr
CommitLineData
f20569fa
XL
1error: you should consider adding a `Default` implementation for `Foo`
2 --> $DIR/new_without_default.rs:8:5
3 |
4LL | / pub fn new() -> Foo {
5LL | | Foo
6LL | | }
7 | |_____^
8 |
9 = note: `-D clippy::new-without-default` implied by `-D warnings`
10help: try this
11 |
12LL | impl Default for Foo {
13LL | fn default() -> Self {
14LL | Self::new()
15LL | }
16LL | }
17 |
18
19error: you should consider adding a `Default` implementation for `Bar`
20 --> $DIR/new_without_default.rs:16:5
21 |
22LL | / pub fn new() -> Self {
23LL | | Bar
24LL | | }
25 | |_____^
26 |
27help: try this
28 |
29LL | impl Default for Bar {
30LL | fn default() -> Self {
31LL | Self::new()
32LL | }
33LL | }
34 |
35
36error: you should consider adding a `Default` implementation for `LtKo<'c>`
37 --> $DIR/new_without_default.rs:80:5
38 |
39LL | / pub fn new() -> LtKo<'c> {
40LL | | unimplemented!()
41LL | | }
42 | |_____^
43 |
44help: try this
45 |
46LL | impl Default for LtKo<'c> {
47LL | fn default() -> Self {
48LL | Self::new()
49LL | }
50LL | }
51 |
52
53error: you should consider adding a `Default` implementation for `NewNotEqualToDerive`
54 --> $DIR/new_without_default.rs:157:5
55 |
56LL | / pub fn new() -> Self {
57LL | | NewNotEqualToDerive { foo: 1 }
58LL | | }
59 | |_____^
60 |
61help: try this
62 |
63LL | impl Default for NewNotEqualToDerive {
64LL | fn default() -> Self {
65LL | Self::new()
66LL | }
67LL | }
68 |
69
70error: aborting due to 4 previous errors
71