]> git.lizzy.rs Git - rust.git/blob - tests/ui/eta.stderr
Merge branch 'master' into fix-3514
[rust.git] / tests / ui / eta.stderr
1 error: redundant closure found
2   --> $DIR/eta.rs:22:27
3    |
4 22 |     let a = Some(1u8).map(|a| foo(a));
5    |                           ^^^^^^^^^^ help: remove closure as shown: `foo`
6    |
7    = note: `-D clippy::redundant-closure` implied by `-D warnings`
8
9 error: redundant closure found
10   --> $DIR/eta.rs:23:10
11    |
12 23 |     meta(|a| foo(a));
13    |          ^^^^^^^^^^ help: remove closure as shown: `foo`
14
15 error: redundant closure found
16   --> $DIR/eta.rs:24:27
17    |
18 24 |     let c = Some(1u8).map(|a| {1+2; foo}(a));
19    |                           ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `{1+2; foo}`
20
21 error: this expression borrows a reference that is immediately dereferenced by the compiler
22   --> $DIR/eta.rs:26:21
23    |
24 26 |     all(&[1, 2, 3], &&2, |x, y| below(x, y)); //is adjusted
25    |                     ^^^ help: change this to: `&2`
26    |
27    = note: `-D clippy::needless-borrow` implied by `-D warnings`
28
29 error: redundant closure found
30   --> $DIR/eta.rs:33:27
31    |
32 33 |     let e = Some(1u8).map(|a| generic(a));
33    |                           ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
34
35 error: aborting due to 5 previous errors
36