]> git.lizzy.rs Git - rust.git/blob - tests/ui/needless_borrowed_ref.stderr
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[rust.git] / tests / ui / needless_borrowed_ref.stderr
1 error: this pattern takes a reference on something that is being de-referenced
2   --> $DIR/needless_borrowed_ref.rs:14:34
3    |
4 LL |     let _ = v.iter_mut().filter(|&ref a| a.is_empty());
5    |                                  ^^^^^^ help: try removing the `&ref` part and just keep: `a`
6    |
7    = note: `-D clippy::needless-borrowed-reference` implied by `-D warnings`
8
9 error: this pattern takes a reference on something that is being de-referenced
10   --> $DIR/needless_borrowed_ref.rs:19:17
11    |
12 LL |     if let Some(&ref v) = thingy {
13    |                 ^^^^^^ help: try removing the `&ref` part and just keep: `v`
14
15 error: this pattern takes a reference on something that is being de-referenced
16   --> $DIR/needless_borrowed_ref.rs:48:27
17    |
18 LL |         (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref'
19    |                           ^^^^^^ help: try removing the `&ref` part and just keep: `k`
20
21 error: this pattern takes a reference on something that is being de-referenced
22   --> $DIR/needless_borrowed_ref.rs:48:38
23    |
24 LL |         (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref'
25    |                                      ^^^^^^ help: try removing the `&ref` part and just keep: `k`
26
27 error: aborting due to 4 previous errors
28