]> git.lizzy.rs Git - rust.git/blob - tests/ui/return_self_not_must_use.stderr
Move `return_self_not_must_use` to `pedantic`
[rust.git] / 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:8:5
3    |
4 LL |     fn what(&self) -> Self;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::return-self-not-must-use` implied by `-D warnings`
8    = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
9
10 error: missing `#[must_use]` attribute on a method returning `Self`
11   --> $DIR/return_self_not_must_use.rs:18:5
12    |
13 LL | /     pub fn foo(&self) -> Self {
14 LL | |         Self
15 LL | |     }
16    | |_____^
17    |
18    = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
19
20 error: missing `#[must_use]` attribute on a method returning `Self`
21   --> $DIR/return_self_not_must_use.rs:21:5
22    |
23 LL | /     pub fn bar(self) -> Self {
24 LL | |         self
25 LL | |     }
26    | |_____^
27    |
28    = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
29
30 error: aborting due to 3 previous errors
31