| error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` | |
| --> tests/ui/double_must_use.rs:8:1 | |
| | | |
| LL | #[must_use] | |
| | ----------- help: remove the attribute | |
| LL | pub fn must_use_result() -> Result<(), ()> { | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: alternatively, you may add an explicit reason to the `must_use` attribute | |
| = note: `-D clippy::double-must-use` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::double_must_use)]` | |
| error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` | |
| --> tests/ui/double_must_use.rs:15:1 | |
| | | |
| LL | #[must_use] | |
| | ----------- help: remove the attribute | |
| LL | pub fn must_use_tuple() -> (Result<(), ()>, u8) { | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: alternatively, you may add an explicit reason to the `must_use` attribute | |
| error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` | |
| --> tests/ui/double_must_use.rs:22:1 | |
| | | |
| LL | #[must_use] | |
| | ----------- help: remove the attribute | |
| LL | pub fn must_use_array() -> [Result<(), ()>; 1] { | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: alternatively, you may add an explicit reason to the `must_use` attribute | |
| error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` | |
| --> tests/ui/double_must_use.rs:40:1 | |
| | | |
| LL | #[must_use] | |
| | ----------- help: remove the attribute | |
| LL | async fn async_must_use_result() -> Result<(), ()> { | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: alternatively, you may add an explicit reason to the `must_use` attribute | |
| error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` | |
| --> tests/ui/double_must_use.rs:55:1 | |
| | | |
| LL | #[must_use] | |
| | ----------- help: remove the attribute | |
| LL | pub fn must_use_result_with_uninhabited_2() -> Result<T, !> { | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: alternatively, you may add an explicit reason to the `must_use` attribute | |
| error: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` | |
| --> tests/ui/double_must_use.rs:66:1 | |
| | | |
| LL | #[must_use] | |
| | ----------- help: remove the attribute | |
| LL | pub fn must_use_controlflow_with_uninhabited_2() -> ControlFlow<std::convert::Infallible, T> { | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: alternatively, you may add an explicit reason to the `must_use` attribute | |
| error: aborting due to 6 previous errors | |