2017-07-01 10:02:00 +00:00
|
|
|
error: this pattern takes a reference on something that is being de-referenced
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/needless_borrowed_ref.rs:5:34
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let _ = v.iter_mut().filter(|&ref a| a.is_empty());
|
2018-10-06 16:18:06 +00:00
|
|
|
| ^^^^^^ help: try removing the `&ref` part and just keep: `a`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-borrowed-reference` implied by `-D warnings`
|
2017-07-01 10:02:00 +00:00
|
|
|
|
|
|
|
error: this pattern takes a reference on something that is being de-referenced
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/needless_borrowed_ref.rs:10:17
|
2017-07-01 10:02:00 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if let Some(&ref v) = thingy {
|
2017-08-31 13:38:24 +00:00
|
|
|
| ^^^^^^ help: try removing the `&ref` part and just keep: `v`
|
2017-07-01 10:02:00 +00:00
|
|
|
|
|
|
|
error: this pattern takes a reference on something that is being de-referenced
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/needless_borrowed_ref.rs:39:27
|
2017-07-01 10:02:00 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref'
|
2017-08-31 13:38:24 +00:00
|
|
|
| ^^^^^^ help: try removing the `&ref` part and just keep: `k`
|
2017-07-01 10:02:00 +00:00
|
|
|
|
|
|
|
error: this pattern takes a reference on something that is being de-referenced
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/needless_borrowed_ref.rs:39:38
|
2017-07-01 10:02:00 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | (&Animal::Cat(v), &ref k) | (&ref k, &Animal::Cat(v)) => (), // lifetime mismatch error if there is no '&ref'
|
2017-08-31 13:38:24 +00:00
|
|
|
| ^^^^^^ help: try removing the `&ref` part and just keep: `k`
|
2017-07-01 10:02:00 +00:00
|
|
|
|
2018-01-16 16:06:27 +00:00
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|