5a5a25c701
Also, a comment is edited to reflect that spaces around the equals-sign in attributes is the standard (q.v. rust-lang-nursery/fmt-rfcs@bea80532e7).
52 lines
1.4 KiB
Plaintext
52 lines
1.4 KiB
Plaintext
warning: unused return value of `need_to_use_this_value` which must be used
|
|
--> $DIR/fn_must_use.rs:60:5
|
|
|
|
|
LL | need_to_use_this_value(); //~ WARN unused return value
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/fn_must_use.rs:13:9
|
|
|
|
|
LL | #![warn(unused_must_use)]
|
|
| ^^^^^^^^^^^^^^^
|
|
= note: it's important
|
|
|
|
warning: unused return value of `MyStruct::need_to_use_this_method_value` which must be used
|
|
--> $DIR/fn_must_use.rs:65:5
|
|
|
|
|
LL | m.need_to_use_this_method_value(); //~ WARN unused return value
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
warning: unused return value of `EvenNature::is_even` which must be used
|
|
--> $DIR/fn_must_use.rs:66:5
|
|
|
|
|
LL | m.is_even(); // trait method!
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: no side effects
|
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` which must be used
|
|
--> $DIR/fn_must_use.rs:72:5
|
|
|
|
|
LL | 2.eq(&3); //~ WARN unused return value
|
|
| ^^^^^^^^^
|
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` which must be used
|
|
--> $DIR/fn_must_use.rs:73:5
|
|
|
|
|
LL | m.eq(&n); //~ WARN unused return value
|
|
| ^^^^^^^^^
|
|
|
|
warning: unused comparison which must be used
|
|
--> $DIR/fn_must_use.rs:76:5
|
|
|
|
|
LL | 2 == 3; //~ WARN unused comparison
|
|
| ^^^^^^
|
|
|
|
warning: unused comparison which must be used
|
|
--> $DIR/fn_must_use.rs:77:5
|
|
|
|
|
LL | m == n; //~ WARN unused comparison
|
|
| ^^^^^^
|
|
|