Make the capitalization explicit on keyword misspell error#149427
Merged
bors merged 1 commit intorust-lang:mainfrom Dec 1, 2025
Merged
Make the capitalization explicit on keyword misspell error#149427bors merged 1 commit intorust-lang:mainfrom
bors merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
cc @Muscraft |
scrabsha
commented
Nov 28, 2025
| | ^^^ | ||
| | | ||
| help: write it in the correct case (notice the capitalization) | ||
| help: write it in lowercase (notice the capitalization) |
Contributor
Author
There was a problem hiding this comment.
the notice the capitalization bit is here because the misspelled keyword has letters that whose capitalization is hard to notice (for instance, u and U are similar, kinda).
i do think it's a good thing and it should be kept because it reinforces the fact that some extra attention is needed in order to spot the mistake.
jdonszelmann
reviewed
Dec 1, 2025
|
|
||
| let case = match (is_upper, is_lower) { | ||
| (true, true) => { | ||
| unreachable!("keyword that is both fully upper- and fully lowercase") |
Contributor
There was a problem hiding this comment.
This triggers on empty keywords. Though I'm not sure if that's possible, I guess not? We were getting rid of the empty identifier anyway so I don't think we need to worry about it.
jdonszelmann
approved these changes
Dec 1, 2025
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Dec 1, 2025
Rollup of 6 pull requests Successful merges: - #149393 (expand valid edition range for use-path-segment-kw.rs) - #149427 (Make the capitalization explicit on keyword misspell error) - #149433 (Use a delayed bug for this layout ICE) - #149473 (Tidying up UI tests [7/N]) - #149505 (Update the comment in the add_typo_suggestion function) - #149513 (`rust-analyzer` subtree update) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to rust-lang/rust-analyzer
that referenced
this pull request
Dec 15, 2025
Rollup of 6 pull requests Successful merges: - rust-lang/rust#149393 (expand valid edition range for use-path-segment-kw.rs) - rust-lang/rust#149427 (Make the capitalization explicit on keyword misspell error) - rust-lang/rust#149433 (Use a delayed bug for this layout ICE) - rust-lang/rust#149473 (Tidying up UI tests [7/N]) - rust-lang/rust#149505 (Update the comment in the add_typo_suggestion function) - rust-lang/rust#149513 (`rust-analyzer` subtree update) r? `@ghost` `@rustbot` modify labels: rollup
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.
r? @jdonszelmann
Will help for #149405.