Closed
Description
$ echo -n 'fn f(){(print!(á' > bug.rs
$ rustc bug.rs
error: this file contains an unclosed delimiter
--> bug.rs:1:17
|
1 | fn f(){(print!(á
| -- - ^
| || |
| || unclosed delimiter
| |unclosed delimiter
| unclosed delimiter
error: format argument must be a string literal
--> bug.rs:1:16
|
1 | fn f(){(print!(á
| ^
|
help: you might be missing a string literal to format with
|
1 | fn f(){(print!("{}", á
| +++++
thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', compiler/rustc_span/src/lib.rs:1710:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.59.0-nightly (83b15bfe1 2021-12-28) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
error: aborting due to 2 previous errors
Reported by @Badel2 here: #92267 (comment)
(Note that #92460 fixes #92267, but does not fix this bug.)
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: This is a bug.Diagnostics: Diagnostics that are unaware of Unicode and trigger codepoint boundary assertionsIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.