]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/needless_borrow.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / needless_borrow.stderr
1 error: this expression borrows a reference that is immediately dereferenced by the compiler
2 --> $DIR/needless_borrow.rs:13:15
3 |
4 13 | let c = x(&&a);
5 | ^^^ help: change this to: `&a`
6 |
7 = note: `-D needless-borrow` implied by `-D warnings`
8
9 error: this pattern creates a reference to a reference
10 --> $DIR/needless_borrow.rs:20:17
11 |
12 20 | if let Some(ref cake) = Some(&5) {}
13 | ^^^^^^^^ help: change this to: `cake`
14
15 error: this expression borrows a reference that is immediately dereferenced by the compiler
16 --> $DIR/needless_borrow.rs:27:15
17 |
18 27 | 46 => &&a,
19 | ^^^ help: change this to: `&a`
20
21 error: this pattern takes a reference on something that is being de-referenced
22 --> $DIR/needless_borrow.rs:49:34
23 |
24 49 | let _ = v.iter_mut().filter(|&ref a| a.is_empty());
25 | ^^^^^^ help: try removing the `&ref` part and just keep: `a`
26 |
27 = note: `-D needless-borrowed-reference` implied by `-D warnings`
28
29 error: this pattern takes a reference on something that is being de-referenced
30 --> $DIR/needless_borrow.rs:50:30
31 |
32 50 | let _ = v.iter().filter(|&ref a| a.is_empty());
33 | ^^^^^^ help: try removing the `&ref` part and just keep: `a`
34
35 error: this pattern creates a reference to a reference
36 --> $DIR/needless_borrow.rs:50:31
37 |
38 50 | let _ = v.iter().filter(|&ref a| a.is_empty());
39 | ^^^^^ help: change this to: `a`
40