rust/tests/ui/lint/unused/unused-closure.stderr

66 lines
1.6 KiB
Plaintext
Raw Normal View History

error: unused closure that must be used
2021-01-26 16:49:30 -06:00
--> $DIR/unused-closure.rs:9:5
|
LL | / || {
LL | | println!("Hello!");
LL | | };
| |_____^
|
2022-09-18 10:55:36 -05:00
= note: closures are lazy and do nothing unless called
note: the lint level is defined here
2021-01-26 16:49:30 -06:00
--> $DIR/unused-closure.rs:6:9
|
LL | #![deny(unused_must_use)]
| ^^^^^^^^^^^^^^^
error: unused implementer of `Future` that must be used
2021-01-26 16:49:30 -06:00
--> $DIR/unused-closure.rs:13:5
|
LL | async {};
| ^^^^^^^^
|
= 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
|
LL | || async {};
| ^^^^^^^^^^^
|
= 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
|
LL | async || {};
| ^^^^^^^^^^^
|
= 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
|
LL | [Box::new([|| {}; 10]); 1];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
LL | vec![|| "a"].pop().unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
LL | || true;
| ^^^^^^^
|
= note: closures are lazy and do nothing unless called
2021-01-26 16:49:30 -06:00
error: aborting due to 7 previous errors