]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.stderr
Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup
[rust.git] / src / tools / clippy / tests / ui-toml / max_suggested_slice_pattern_length / index_refutable_slice.stderr
1 error: this binding can be a slice pattern to avoid indexing
2   --> $DIR/index_refutable_slice.rs:5:17
3    |
4 LL |     if let Some(slice) = slice {
5    |                 ^^^^^
6    |
7 note: the lint level is defined here
8   --> $DIR/index_refutable_slice.rs:1:9
9    |
10 LL | #![deny(clippy::index_refutable_slice)]
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 help: try using a slice pattern here
13    |
14 LL |     if let Some([_, _, _, _, _, _, _, slice_7, ..]) = slice {
15    |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 help: and replace the index expressions here
17    |
18 LL |         println!("{}", slice_7);
19    |                        ~~~~~~~
20
21 error: aborting due to previous error
22