mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-28 07:30:57 +00:00
41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
|
error: using a rest pattern to bind an entire slice to a local
|
||
|
--> $DIR/redundant_rest_pattern.rs:10:12
|
||
|
|
|
||
|
LL | if let [a @ ..] = [()] {}
|
||
|
| ^^^^^^^^ help: this is better represented with just the binding: `a`
|
||
|
|
|
||
|
= note: `-D clippy::redundant-rest-pattern` implied by `-D warnings`
|
||
|
|
||
|
error: using a rest pattern to bind an entire slice to a local
|
||
|
--> $DIR/redundant_rest_pattern.rs:11:12
|
||
|
|
|
||
|
LL | if let [ref a @ ..] = [()] {}
|
||
|
| ^^^^^^^^^^^^ help: this is better represented with just the binding: `ref a`
|
||
|
|
||
|
error: using a rest pattern to bind an entire slice to a local
|
||
|
--> $DIR/redundant_rest_pattern.rs:12:12
|
||
|
|
|
||
|
LL | if let [mut a @ ..] = [()] {}
|
||
|
| ^^^^^^^^^^^^ help: this is better represented with just the binding: `mut a`
|
||
|
|
||
|
error: using a rest pattern to bind an entire slice to a local
|
||
|
--> $DIR/redundant_rest_pattern.rs:13:12
|
||
|
|
|
||
|
LL | if let [ref mut a @ ..] = [()] {}
|
||
|
| ^^^^^^^^^^^^^^^^ help: this is better represented with just the binding: `ref mut a`
|
||
|
|
||
|
error: using a rest pattern to bind an entire slice to a local
|
||
|
--> $DIR/redundant_rest_pattern.rs:15:12
|
||
|
|
|
||
|
LL | if let [a @ ..] = &*v {}
|
||
|
| ^^^^^^^^ help: this is better represented with just the binding: `a`
|
||
|
|
||
|
error: using a rest pattern to bind an entire slice to a local
|
||
|
--> $DIR/redundant_rest_pattern.rs:17:12
|
||
|
|
|
||
|
LL | if let [a @ ..] = s {}
|
||
|
| ^^^^^^^^ help: this is better represented with just the binding: `a`
|
||
|
|
||
|
error: aborting due to 6 previous errors
|
||
|
|