Skip to content

Tracking Issue: Fix auto-applicable lint suggestions by using multipart suggestions #13099

@flip1995

Description

@flip1995
Member

Description

#13098 introduced @no-rustfix annotations, that can be removed by changing the suggestion to a multipart suggestion:

//@no-rustfix: need to change the suggestion to a multipart suggestion

The affected test files are:

  • ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs
    ui/crashes/ice-3717.rs
    ui/derivable_impls.rs
    ui/index_refutable_slice/if_let_slice_binding.rs
    ui/index_refutable_slice/slice_indexing_in_macro.rs
    ui/let_unit.rs
    ui/manual_assert.rs
    ui/manual_async_fn.rs
    ui/manual_split_once.rs
    ui/match_same_arms2.rs
    ui/significant_drop_tightening.rs
    ui/unnecessary_iter_cloned.rs
    ui/unnecessary_to_owned.rs

To fix some of those:

  1. Pick one test and leave a comment about it
  2. Remove the @no-rustfix annotation
  3. Change the lint suggestion building to use multipart_suggestion over the current implementation
  4. write a comment here or mention this issue in the PR so that it gets marked as resolved.

Version

No response

Additional Labels

No response

Activity

added
good first issueThese issues are a good way to get started with Clippy
E-mediumCall for participation: Medium difficulty level problem and requires some initial experience.
on Jul 15, 2024
ibilalkayy

ibilalkayy commented on Aug 4, 2024

@ibilalkayy

Hey @flip1995, I just sent a PR to solve a problem that you mentioned in this issue. Thank you!

added a commit that references this issue on Aug 7, 2024
added 2 commits that reference this issue on Aug 12, 2024
flip1995

flip1995 commented on Sep 23, 2024

@flip1995
MemberAuthor

Copying a comment by @kyoto7250, that explains the tasks here a bit better than I have in the issue: #13216 (comment)

I [kyoto7250] have created a PR that fixes one of the files in this issue. #13230

In PR #13098, all tests that were expected to split into multipart files have been deleted and set to be skipped using @no-rustfix. Therefore, simply removing the annotation is not sufficient.

You remove @no-rustfix and run cargo uitest locally, the tests should fail. For more details, please refer to the following documentation:

https://github.com/rust-lang/rust-clippy/blob/master/book/src/development/writing_tests.md

In my PR, multiple files were not generated, but I believe that in this issue, it is expected that multiple files will be generated by the multipart suggestion.

scottgerring

scottgerring commented on Nov 22, 2024

@scottgerring
Contributor

I pushed a change to address this for ui/derivable_impls.rs - if it looks sane, i'll polish up a few of the others too!

scottgerring

scottgerring commented on Nov 25, 2024

@scottgerring
Contributor

I pushed a change for ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs above too.

17 remaining items

nanvel

nanvel commented on Dec 17, 2024

@nanvel
Contributor

Hi, a fix for unnecessary_to_owned: #13847
looking for a review.

scottgerring

scottgerring commented on Dec 17, 2024

@scottgerring
Contributor

All of these are either done or have an open PR apart from ui/unnecessary_iter_cloned.rs which I will knock out tomorrow. @flip1995 , do you mind updating the issue text at the top - I don't think I have that power ?!

scottgerring

scottgerring commented on Dec 20, 2024

@scottgerring
Contributor

All done pending the last two merges 💪

added a commit that references this issue on Jul 7, 2025
da8e386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-tracking-issueCategory: Tracking IssueE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.good first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @scottgerring@nanvel@flip1995@ibilalkayy

    Issue actions

      Tracking Issue: Fix auto-applicable lint suggestions by using multipart suggestions · Issue #13099 · rust-lang/rust-clippy