Moved lints from strings to methods - #17512
Open
MassimilianoBaglioni wants to merge 2 commits into
Open
Conversation
MassimilianoBaglioni
marked this pull request as ready for review
August 6, 2026 13:30
Contributor
|
Can you split this into one commit per lint moved, please. Also when fixing CI errors you're better off force-pushing. We're going to ask you to squash those commits before merging and it doesn't affect reviewers much if you're immediately changing commits. |
MassimilianoBaglioni
force-pushed
the
strings-to-method-refactor
branch
from
August 11, 2026 17:06
04a75b8 to
27e5b3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changelog: none
Moves
STRING_FROM_UTF8_AS_BYTESandTRIM_SPLIT_WHITESPACEfromstrings.rsinto the sharedMethodsdispatch inmethods.rs.Questions:
TRIM_SPLIT_WHITESPACEnow inherits thefrom_expansion()check inMethods::check_expr. It had no macro guard before. Tests still pass (no test covers macro-expanded call sites), but this is an untested behavior change worth flagging.STRING_LIT_AS_BYTEStoo, but some tests use macros, and thefrom_expansion()check inMethods::check_exprprevents the lint from firing on those cases, so tests failed. I kept it instrings.rsfor now because of this. How should I proceed?STR_TO_STRINGnot moved yet, one branch matchesExprKind::Path, notMethodCall, so it doesn't fit the shared dispatch. Should this get its own arm incheck_expr, stay separate, or something else?Also happy to get feedback/comments on the code already moved, not just on the open questions above.
fixes #14253