about summary refs log tree commit diff
path: root/compiler/rustc_llvm/src
diff options
context:
space:
mode:
authorTimo <30553356+y21@users.noreply.github.com>2024-12-10 19:03:59 +0000
committerGitHub <noreply@github.com>2024-12-10 19:03:59 +0000
commit2a28347897fcf9c87e38b753aeeadbbe72ae1e55 (patch)
treef8ca4180b6e9a2ed58251f0facf8bf04359ca675 /compiler/rustc_llvm/src
parent6a3ef9349213727b47e61aa74cf0627b87c7f08a (diff)
parente493664e1586ece0cbb17d31de6f5d06a496937d (diff)
downloadrust-2a28347897fcf9c87e38b753aeeadbbe72ae1e55.tar.gz
rust-2a28347897fcf9c87e38b753aeeadbbe72ae1e55.zip
Fix: fixed multipart_suggestion in index_refutable_slice uitest (#13727)
This should address #13099 for the derivable_impls test. As this
combines everything into a single multipart_suggestion, the feedback
message is a little less "targeted" than it was before, but now it
provides a complete`--fix`able suggestion - e.g.:

```
error: this binding can be a slice pattern to avoid indexing
  --> tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs:5:17
   |
LL |     if let Some(slice) = slice {
   |                 ^^^^^
   |
note: the lint level is defined here
  --> tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.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_7, ..]) = slice {
LL |
LL |         // This would usually not be linted but is included now due to the
LL |         // index limit in the config file
LL ~         println!("{}", slice_7);
   |
```

changelog: [index_refutable_slice]: Fixed multipart_suggestions to
provide correct rustfix-able lint
Diffstat (limited to 'compiler/rustc_llvm/src')
0 files changed, 0 insertions, 0 deletions