mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
35 lines
1.5 KiB
Text
35 lines
1.5 KiB
Text
error: this function could have a `#[must_use]` attribute
|
|
--> tests/ui/must_use_candidates.rs:11:1
|
|
|
|
|
LL | pub fn pure(i: u8) -> u8 {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn pure(i: u8) -> u8`
|
|
|
|
|
= note: `-D clippy::must-use-candidate` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::must_use_candidate)]`
|
|
|
|
error: this method could have a `#[must_use]` attribute
|
|
--> tests/ui/must_use_candidates.rs:16:5
|
|
|
|
|
LL | pub fn inherent_pure(&self) -> u8 {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn inherent_pure(&self) -> u8`
|
|
|
|
error: this function could have a `#[must_use]` attribute
|
|
--> tests/ui/must_use_candidates.rs:47:1
|
|
|
|
|
LL | pub fn with_marker(_d: std::marker::PhantomData<&mut u32>) -> bool {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn with_marker(_d: std::marker::PhantomData<&mut u32>) -> bool`
|
|
|
|
error: this function could have a `#[must_use]` attribute
|
|
--> tests/ui/must_use_candidates.rs:59:1
|
|
|
|
|
LL | pub fn rcd(_x: Rc<u32>) -> bool {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn rcd(_x: Rc<u32>) -> bool`
|
|
|
|
error: this function could have a `#[must_use]` attribute
|
|
--> tests/ui/must_use_candidates.rs:67:1
|
|
|
|
|
LL | pub fn arcd(_x: Arc<u32>) -> bool {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn arcd(_x: Arc<u32>) -> bool`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|