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