bug.rs:1:25 | 1 | fn i(){println!("馃%%%";r | - - ^ | | | | | ...">

assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32 路 Issue #92267 路 rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@dwrensha

Description

@dwrensha

rustc crashes on the following input, found by fuzz_rustc:

fn i(){println!("馃%%%";r

error: this file contains an unclosed delimiter
 --> bug.rs:1:25
  |
1 | fn i(){println!("馃%%%";r
  |       -        -         ^
  |       |        |
  |       |        unclosed delimiter
  |       unclosed delimiter

error: expected `,`, found `;`
 --> bug.rs:1:23
  |
1 | fn i(){println!("馃%%%";r
  |                        ^ expected `,`

error: argument never used
 --> bug.rs:1:24
  |
1 | fn i(){println!("馃%%%";r
  |                         ^ argument never used
  |
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 (c09a9529c 2021-12-23) running on x86_64-unknown-linux-gnu