rust-clippy/tests/ui/needless_borrowed_ref.stderr

29 lines
1.3 KiB
Text
Raw Normal View History

error: this pattern takes a reference on something that is being de-referenced
--> $DIR/needless_borrowed_ref.rs:8:34
2017-06-29 11:46:07 +00:00
|
8 | let _ = v.iter_mut().filter(|&ref a| a.is_empty());
| ^^^^^^ help: try removing the `&ref` part and just keep: `a`
2017-06-29 11:46:07 +00:00
|
= note: `-D needless-borrowed-reference` implied by `-D warnings`
error: this pattern takes a reference on something that is being de-referenced
--> $DIR/needless_borrowed_ref.rs:13:17
|
13 | if let Some(&ref v) = thingy {
| ^^^^^^ help: try removing the `&ref` part and just keep: `v`
error: this pattern takes a reference on something that is being de-referenced
--> $DIR/needless_borrowed_ref.rs:42:27
|
42 | (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref'
| ^^^^^^ help: try removing the `&ref` part and just keep: `k`
error: this pattern takes a reference on something that is being de-referenced
--> $DIR/needless_borrowed_ref.rs:42:38
|
42 | (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref'
| ^^^^^^ help: try removing the `&ref` part and just keep: `k`
2018-01-16 16:06:27 +00:00
error: aborting due to 4 previous errors