rust/src/test/ui/fn_must_use.stderr

58 lines
1.7 KiB
Plaintext
Raw Normal View History

warning: unused return value of `need_to_use_this_value` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:55:5
|
2018-02-22 18:42:32 -06:00
LL | need_to_use_this_value(); //~ WARN unused return value
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:3:9
|
2018-02-22 18:42:32 -06:00
LL | #![warn(unused_must_use)]
| ^^^^^^^^^^^^^^^
= note: it's important
warning: unused return value of `MyStruct::need_to_use_this_method_value` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:60:5
|
2018-02-22 18:42:32 -06:00
LL | m.need_to_use_this_method_value(); //~ WARN unused return value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused return value of `EvenNature::is_even` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:61:5
|
2018-02-22 18:42:32 -06:00
LL | m.is_even(); // trait method!
| ^^^^^^^^^^^^
|
= note: no side effects
warning: unused return value of `MyStruct::need_to_use_this_associated_function_value` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:64:5
|
LL | MyStruct::need_to_use_this_associated_function_value();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:70:5
|
2018-02-22 18:42:32 -06:00
LL | 2.eq(&3); //~ WARN unused return value
| ^^^^^^^^^
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:71:5
|
2018-02-22 18:42:32 -06:00
LL | m.eq(&n); //~ WARN unused return value
| ^^^^^^^^^
warning: unused comparison that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:74:5
|
2018-02-22 18:42:32 -06:00
LL | 2 == 3; //~ WARN unused comparison
| ^^^^^^
warning: unused comparison that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/fn_must_use.rs:75:5
|
2018-02-22 18:42:32 -06:00
LL | m == n; //~ WARN unused comparison
| ^^^^^^