]> git.lizzy.rs Git - rust.git/blob - tests/ui/new_without_default.stderr
clean tests/ui/new_without_default.rs
[rust.git] / tests / ui / new_without_default.stderr
1 error: you should consider deriving a `Default` implementation for `Foo`
2   --> $DIR/new_without_default.rs:10:5
3    |
4 10 |     pub fn new() -> Foo { Foo }
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: lint level defined here
8   --> $DIR/new_without_default.rs:5:30
9    |
10 5  | #![deny(new_without_default, new_without_default_derive)]
11    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
12 help: try this
13    | #[derive(Default)]
14    | pub struct Foo;
15
16 error: you should consider deriving a `Default` implementation for `Bar`
17   --> $DIR/new_without_default.rs:16:5
18    |
19 16 |     pub fn new() -> Self { Bar }
20    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21    |
22 help: try this
23    | #[derive(Default)]
24    | pub struct Bar;
25
26 error: you should consider adding a `Default` implementation for `LtKo<'c>`
27   --> $DIR/new_without_default.rs:64:5
28    |
29 64 |     pub fn new() -> LtKo<'c> { unimplemented!() }
30    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31    |
32 note: lint level defined here
33   --> $DIR/new_without_default.rs:5:9
34    |
35 5  | #![deny(new_without_default, new_without_default_derive)]
36    |         ^^^^^^^^^^^^^^^^^^^
37 help: try this
38    |     impl Default for LtKo<'c> {
39    |         fn default() -> Self {
40    |             Self::new()
41    |         }
42    |     }
43    | 
44 ...
45
46 error: aborting due to 3 previous errors
47