]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/new_without_default.stderr
afae03ee9b0ceac7095888ba930cddc7df48cb70
[rust.git] / clippy_tests / examples / new_without_default.stderr
1 error: you should consider deriving a `Default` implementation for `Foo`
2   --> new_without_default.rs:10:5
3    |
4 10 |     pub fn new() -> Foo { Foo }
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D new-without-default-derive` implied by `-D warnings`
8 help: try this
9    | #[derive(Default)]
10
11 error: you should consider deriving a `Default` implementation for `Bar`
12   --> new_without_default.rs:16:5
13    |
14 16 |     pub fn new() -> Self { Bar }
15    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16    |
17    = note: `-D new-without-default-derive` implied by `-D warnings`
18 help: try this
19    | #[derive(Default)]
20
21 error: you should consider adding a `Default` implementation for `LtKo<'c>`
22   --> new_without_default.rs:64:5
23    |
24 64 |     pub fn new() -> LtKo<'c> { unimplemented!() }
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26    |
27    = note: `-D new-without-default` implied by `-D warnings`
28 help: try this
29    |     impl Default for LtKo<'c> {
30    |         fn default() -> Self {
31    |             Self::new()
32    |         }
33    |     }
34    | 
35 ...
36
37 error: aborting due to previous error(s)
38
39 error: Could not compile `clippy_tests`.
40
41 To learn more, run the command again with --verbose.