2020-07-27 19:00:00 -05:00
|
|
|
error: unused closure that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:9:5
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | / || {
|
|
|
|
LL | | println!("Hello!");
|
|
|
|
LL | | };
|
2022-08-16 09:46:33 -05:00
|
|
|
| |_____^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: closures are lazy and do nothing unless called
|
2020-07-27 19:00:00 -05:00
|
|
|
note: the lint level is defined here
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:6:9
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(unused_must_use)]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error: unused implementer of `Future` that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:13:5
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | async {};
|
2022-08-16 09:46:33 -05:00
|
|
|
| ^^^^^^^^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
= note: futures do nothing unless you `.await` or poll them
|
|
|
|
|
|
|
|
error: unused closure that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:14:5
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | || async {};
|
2022-08-16 09:46:33 -05:00
|
|
|
| ^^^^^^^^^^^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
|
|
|
error: unused closure that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:15:5
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | async || {};
|
2022-08-16 09:46:33 -05:00
|
|
|
| ^^^^^^^^^^^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
|
|
|
error: unused array of boxed arrays of closures that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:18:5
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | [Box::new([|| {}; 10]); 1];
|
2022-08-16 09:46:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
|
|
|
error: unused closure that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:20:5
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | vec![|| "a"].pop().unwrap();
|
2022-08-16 09:46:33 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
|
|
|
error: unused closure that must be used
|
2021-01-26 16:49:30 -06:00
|
|
|
--> $DIR/unused-closure.rs:23:9
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
LL | || true;
|
2022-08-16 09:46:33 -05:00
|
|
|
| ^^^^^^^
|
2020-07-27 19:00:00 -05:00
|
|
|
|
|
|
|
|
= note: closures are lazy and do nothing unless called
|
|
|
|
|
2021-01-26 16:49:30 -06:00
|
|
|
error: aborting due to 7 previous errors
|
2020-07-27 19:00:00 -05:00
|
|
|
|