]> git.lizzy.rs Git - rust.git/blob - tests/ui/eta.stderr
Merge pull request #1715 from Manishearth/rustup
[rust.git] / tests / ui / eta.stderr
1 error: redundant closure found
2  --> $DIR/eta.rs:7:27
3   |
4 7 |     let a = Some(1u8).map(|a| foo(a));
5   |                           ^^^^^^^^^^ help: remove closure as shown: `foo`
6   |
7 note: lint level defined here
8  --> $DIR/eta.rs:4:9
9   |
10 4 | #![deny(redundant_closure)]
11   |         ^^^^^^^^^^^^^^^^^
12
13 error: redundant closure found
14   --> $DIR/eta.rs:11:10
15    |
16 11 |     meta(|a| foo(a));
17    |          ^^^^^^^^^^ help: remove closure as shown: `foo`
18
19 error: redundant closure found
20   --> $DIR/eta.rs:15:27
21    |
22 15 |     let c = Some(1u8).map(|a| {1+2; foo}(a));
23    |                           ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `{1+2; foo}`
24
25 warning: this expression borrows a reference that is immediately dereferenced by the compiler
26   --> $DIR/eta.rs:20:21
27    |
28 20 |     all(&[1, 2, 3], &&2, |x, y| below(x, y)); //is adjusted
29    |                     ^^^
30    |
31    = note: #[warn(needless_borrow)] on by default
32
33 error: redundant closure found
34   --> $DIR/eta.rs:28:27
35    |
36 28 |     let e = Some(1u8).map(|a| generic(a));
37    |                           ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
38
39 error: aborting due to 4 previous errors
40