mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
98a92bf093
This PR: - adds structured suggestions to all 3 lint scenarios - adds more examples of linted patterns, and recommended fixes - moves some test cases to `_unfixable.rs`, to allow running rustfix on the main file - stops the lint from firing multiple times on types like `&mut &mut &mut T` Open questions: - I'd like to add a note explaining why chained `&mut` are useless.. but can't really come up with something consice. I very much don't like the one in the docs -- it's a bit too condescending imo. - see comments in the diff for more I do realize that the PR ended up being quite wide-scoped, but that's primarily because once I added structured suggestions to one of the lint cases, `ui_test` started complaining about warnings remaining after the rustfix run, which of course had to with the fact that the other two lint cases didn't actually fix the code they linted, only warned. I _guess_ `ui_test` could be smarter about this, by understanding that if a warning was created without a suggestion, then that warning will still remain in the fixed file. But oh well. changelog: [`mut_mut`]: add structured suggestions, improve docs fixes rust-lang/rust-clippy#13021