]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/return_self_not_must_use.stderr
Rollup merge of #92055 - tmandry:relnotes-1.58, r=pietroalbini
[rust.git] / src / tools / clippy / tests / ui / return_self_not_must_use.stderr
1 error: missing `#[must_use]` attribute on a method returning `Self`
2   --> $DIR/return_self_not_must_use.rs:7:5
3    |
4 LL |     fn what(&self) -> Self;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::return-self-not-must-use` implied by `-D warnings`
8
9 error: missing `#[must_use]` attribute on a method returning `Self`
10   --> $DIR/return_self_not_must_use.rs:17:5
11    |
12 LL | /     pub fn foo(&self) -> Self {
13 LL | |         Self
14 LL | |     }
15    | |_____^
16
17 error: missing `#[must_use]` attribute on a method returning `Self`
18   --> $DIR/return_self_not_must_use.rs:20:5
19    |
20 LL | /     pub fn bar(self) -> Self {
21 LL | |         self
22 LL | |     }
23    | |_____^
24
25 error: aborting due to 3 previous errors
26