Files
rust/tests/ui/index_refutable_slice/slice_indexing_in_macro.stderr

22 lines
645 B
Plaintext

error: this binding can be a slice pattern to avoid indexing
--> tests/ui/index_refutable_slice/slice_indexing_in_macro.rs:23:21
|
LL | if let Some(slice) = slice;
| ^^^^^
|
note: the lint level is defined here
--> tests/ui/index_refutable_slice/slice_indexing_in_macro.rs:1:9
|
LL | #![deny(clippy::index_refutable_slice)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: replace the binding and indexed access with a slice pattern
|
LL ~ if let Some([slice_0, ..]) = slice;
LL |
LL | then {
LL ~ println!("{}", slice_0);
|
error: aborting due to 1 previous error