-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rustc_parse_format
spans following escaped utf-8 multibyte chars
#103651
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but let's do a perf run just to make sure there's no impact
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit f5e390e with merge 1904eda6ee665febddb42ef6678305eb2472b264... |
☀️ Try build successful - checks-actions |
Queued 1904eda6ee665febddb42ef6678305eb2472b264 with parent a9ef100, future comparison URL. |
Finished benchmarking commit (1904eda6ee665febddb42ef6678305eb2472b264): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Thanks @Alexendoo! @bors r+ rollup |
…apes, r=wesleywiser Fix `rustc_parse_format` spans following escaped utf-8 multibyte chars Currently too many skips are created for char escapes that are larger than 1 byte when encoded in UTF-8, [playground:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c77a9dc669b69b167271b59ed2c8d88c) ```rust fn main() { format!("\u{df}{a}"); format!("\u{211d}{a}"); format!("\u{1f4a3}{a}"); } ``` ``` error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope --> src/main.rs:2:22 | 2 | format!("\u{df}{a}"); | ^ not found in this scope error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope --> src/main.rs:3:25 | 3 | format!("\u{211d}{a}"); | ^ not found in this scope error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope --> src/main.rs:4:27 | 4 | format!("\u{1f4a3}{a}"); | ^ not found in this scope ``` This reduces the number of skips to account for that Fixes rust-lang/rust-clippy#9727
…apes, r=wesleywiser Fix `rustc_parse_format` spans following escaped utf-8 multibyte chars Currently too many skips are created for char escapes that are larger than 1 byte when encoded in UTF-8, [playground:](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c77a9dc669b69b167271b59ed2c8d88c) ```rust fn main() { format!("\u{df}{a}"); format!("\u{211d}{a}"); format!("\u{1f4a3}{a}"); } ``` ``` error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope --> src/main.rs:2:22 | 2 | format!("\u{df}{a}"); | ^ not found in this scope error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope --> src/main.rs:3:25 | 3 | format!("\u{211d}{a}"); | ^ not found in this scope error[[E0425]](https://doc.rust-lang.org/stable/error-index.html#E0425): cannot find value `a` in this scope --> src/main.rs:4:27 | 4 | format!("\u{1f4a3}{a}"); | ^ not found in this scope ``` This reduces the number of skips to account for that Fixes rust-lang/rust-clippy#9727
Rollup of 7 pull requests Successful merges: - rust-lang#103446 (Specialize `iter::ArrayChunks::fold` for TrustedRandomAccess iterators) - rust-lang#103651 (Fix `rustc_parse_format` spans following escaped utf-8 multibyte chars) - rust-lang#103865 (Move `fallback_has_occurred` state tracking to `FnCtxt`) - rust-lang#103955 (Update linker-plugin-lto.md to contain up to Rust 1.65) - rust-lang#103987 (Remove `in_tail_expr` from FnCtxt) - rust-lang#104067 (fix debuginfo for windows_gnullvm_base.rs) - rust-lang#104094 (fully move `on_unimplemented` to `error_reporting`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Currently too many skips are created for char escapes that are larger than 1 byte when encoded in UTF-8, playground:
This reduces the number of skips to account for that
Fixes rust-lang/rust-clippy#9727