fix: make analysis-stats progress bar Unicode-safe - #22909
Merged
ChayimFriedman2 merged 1 commit intoJul 27, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
|
Please note that our AI policy disallows using AI to write GitHub comments or PR descriptions. |
ChayimFriedman2
requested changes
Jul 25, 2026
Contributor
Author
sure will do |
AayushMainali-Github
force-pushed
the
fix/22844-unicode-progress-report
branch
from
July 27, 2026 18:34
c2762aa to
5c7381c
Compare
ChayimFriedman2
requested changes
Jul 27, 2026
Contributor
Author
done! |
Contributor
Author
I thought the only change required was to just convert |
AayushMainali-Github
force-pushed
the
fix/22844-unicode-progress-report
branch
from
July 27, 2026 18:54
79e117f to
e5197b0
Compare
Contributor
Author
|
squashed and added tests back (all are passing locally) |
ChayimFriedman2
approved these changes
Jul 27, 2026
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.
Fixes #22844
The analysis-stats progress bar compared byte lengths with character indices when updating its message. Non-ASCII identifiers such as
消息madechars().nth(...).unwrap()panic.Measure common prefixes and clear widths in Unicode scalar values instead, and add regression tests.
Test plan
cargo test -p rust-analyzer --lib cli::progress_report::rustfmt --check crates/rust-analyzer/src/cli/progress_report.rscargo clippy -p rust-analyzer --lib -- -D warningsAI disclosure: Assisted by Cursor (Grok).