]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/unused-closure.stderr
Auto merge of #106989 - clubby789:is-zero-num, r=scottmcm
[rust.git] / tests / ui / lint / unused / unused-closure.stderr
1 error: unused closure that must be used
2   --> $DIR/unused-closure.rs:9:5
3    |
4 LL | /     || {
5 LL | |         println!("Hello!");
6 LL | |     };
7    | |_____^
8    |
9    = note: closures are lazy and do nothing unless called
10 note: the lint level is defined here
11   --> $DIR/unused-closure.rs:6:9
12    |
13 LL | #![deny(unused_must_use)]
14    |         ^^^^^^^^^^^^^^^
15
16 error: unused implementer of `Future` that must be used
17   --> $DIR/unused-closure.rs:13:5
18    |
19 LL |     async {};
20    |     ^^^^^^^^
21    |
22    = note: futures do nothing unless you `.await` or poll them
23
24 error: unused closure that must be used
25   --> $DIR/unused-closure.rs:14:5
26    |
27 LL |     || async {};
28    |     ^^^^^^^^^^^
29    |
30    = note: closures are lazy and do nothing unless called
31
32 error: unused closure that must be used
33   --> $DIR/unused-closure.rs:15:5
34    |
35 LL |     async || {};
36    |     ^^^^^^^^^^^
37    |
38    = note: closures are lazy and do nothing unless called
39
40 error: unused array of boxed arrays of closures that must be used
41   --> $DIR/unused-closure.rs:18:5
42    |
43 LL |     [Box::new([|| {}; 10]); 1];
44    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
45    |
46    = note: closures are lazy and do nothing unless called
47
48 error: unused closure that must be used
49   --> $DIR/unused-closure.rs:20:5
50    |
51 LL |     vec![|| "a"].pop().unwrap();
52    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
53    |
54    = note: closures are lazy and do nothing unless called
55
56 error: unused closure that must be used
57   --> $DIR/unused-closure.rs:23:9
58    |
59 LL |         || true;
60    |         ^^^^^^^
61    |
62    = note: closures are lazy and do nothing unless called
63
64 error: aborting due to 7 previous errors
65