]> git.lizzy.rs Git - rust.git/blob - tests/ui/needless_borrow.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / needless_borrow.stderr
1 error: this expression borrows a reference that is immediately dereferenced by the compiler
2   --> $DIR/needless_borrow.rs:14:15
3    |
4 LL |     let c = x(&&a);
5    |               ^^^ help: change this to: `&a`
6    |
7    = note: `-D clippy::needless-borrow` implied by `-D warnings`
8
9 error: this pattern creates a reference to a reference
10   --> $DIR/needless_borrow.rs:21:17
11    |
12 LL |     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:28:15
17    |
18 LL |         46 => &&a,
19    |               ^^^ help: change this to: `&a`
20
21 error: this pattern creates a reference to a reference
22   --> $DIR/needless_borrow.rs:51:31
23    |
24 LL |     let _ = v.iter().filter(|&ref a| a.is_empty());
25    |                               ^^^^^ help: change this to: `a`
26
27 error: aborting due to 4 previous errors
28