fix(useless_conversion): ignore From::from in generated code - #17583
fix(useless_conversion): ignore From::from in generated code#17583NicDevTV wants to merge 1 commit into
Conversation
|
Thanks for the pull request, and welcome! You should hear from one of our reviewers after this PR gets at least 2 reviews from the community. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
12684da to
1e9b5e4
Compare
|
like this @CommanderStorm ? |
|
yes, tnx |
|
Hello @NicDevTV, seems that an LLM assisted in this PR, we require disclosure as per the LLM policy |
|
@blyxyas Yes, I used an LLM while working on this PR. I used it to help me understand parts of the codebase and to explore a possible solution approach. I reviewed and understood the approach myself and implemented the actual changes on my own. |
Summary
useless_conversionreported false positives for redundantFrom::fromcalls inside#[automatically_derived]implementations involving generic associated types.This change skips that specific lint case for automatically derived code while preserving the existing behavior for regular code and other conversion methods. A regression UI test based on #17083 was added.
Testing
cargo fmt --all -- --checkgit diff --checkuseless_conversionUI testsui-tomltest suiteThe complete
cargo testsuite could not be run locally because some dependencies were unavailable in the offline environment.changelog: [
useless_conversion]: Avoid linting redundantFrom::fromconversions in automatically derived implementations.fixes #17083