2023-07-02 07:35:19 -05:00
|
|
|
error: using a rest pattern to bind an entire slice to a local
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_at_rest_pattern.rs:9:12
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
LL | if let [a @ ..] = [()] {}
|
|
|
|
| ^^^^^^^^ help: this is better represented with just the binding: `a`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-at-rest-pattern` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_at_rest_pattern)]`
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
error: using a rest pattern to bind an entire slice to a local
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_at_rest_pattern.rs:10:12
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_at_rest_pattern.rs:11:12
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_at_rest_pattern.rs:12:12
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_at_rest_pattern.rs:14:12
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/redundant_at_rest_pattern.rs:16:12
|
2023-07-02 07:35:19 -05:00
|
|
|
|
|
|
|
|
LL | if let [a @ ..] = s {}
|
|
|
|
| ^^^^^^^^ help: this is better represented with just the binding: `a`
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|