Skip to content

"é" in the code caused "bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32" #80134

Closed
@sylvestre

Description

@sylvestre

Was reported here : #68730
but still occurring.

Code

fn main() {
    let matches = App::new()
        .arg(
            Arg::with_name(OPT_MODE)é
        );
    
}

Meta

rustc --version --verbose:

rustc 1.50.0-nightly (b32e6e6ac 2020-12-16)
binary: rustc
commit-hash: b32e6e6ac8921035177256ab6806e6ab0d4b9b94
commit-date: 2020-12-16
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly

Error output

  Compiling bug v0.1.0 (/tmp/bug)
     Running `rustc --crate-name bug --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=51917d1ea2d63dad -C extra-filename=-51917d1ea2d63dad --out-dir /tmp/bug/target/debug/deps -C incremental=/tmp/bug/target/debug/incremental -L dependency=/tmp/bug/target/debug/deps`
thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', compiler/rustc_span/src/lib.rs:1489: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.50.0-nightly (b32e6e6ac 2020-12-16) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `bug`

Caused by:
  process didn't exit successfully: `rustc --crate-name bug --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=51917d1ea2d63dad -C extra-filename=-51917d1ea2d63dad --out-dir /tmp/bug/target/debug/deps -C incremental=/tmp/bug/target/debug/incremental -L dependency=/tmp/bug/target/debug/deps` (exit code: 101)
Backtrace

thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', compiler/rustc_span/src/lib.rs:1489:17
stack backtrace:
   0: rust_begin_unwind
             at /rustc/b32e6e6ac8921035177256ab6806e6ab0d4b9b94/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/b32e6e6ac8921035177256ab6806e6ab0d4b9b94/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/b32e6e6ac8921035177256ab6806e6ab0d4b9b94/library/core/src/panicking.rs:50:5
   3: rustc_span::SourceFile::lookup_file_pos
   4: rustc_span::SourceFile::lookup_file_pos_with_col_display
   5: rustc_span::source_map::SourceMap::is_multiline
   6: rustc_parse::parser::Parser::parse_seq_to_before_tokens
   7: rustc_parse::parser::Parser::parse_delim_comma_seq
   8: rustc_parse::parser::expr::<impl rustc_parse::parser::Parser>::parse_dot_or_call_expr_with_
   9: rustc_parse::parser::expr::<impl rustc_parse::parser::Parser>::parse_dot_or_call_expr_with
  10: rustc_parse::parser::expr::<impl rustc_parse::parser::Parser>::parse_prefix_expr::{{closure}}
  11: rustc_parse::parser::expr::<impl rustc_parse::parser::Parser>::parse_prefix_expr
  12: rustc_parse::parser::expr::<impl rustc_parse::parser::Parser>::parse_assoc_expr_with
  13: rustc_parse::parser::stmt::<impl rustc_parse::parser::Parser>::parse_local
  14: rustc_parse::parser::stmt::<impl rustc_parse::parser::Parser>::parse_stmt_without_recovery::{{closure}}
  15: rustc_parse::parser::stmt::<impl rustc_parse::parser::Parser>::parse_stmt_without_recovery
  16: rustc_parse::parser::stmt::<impl rustc_parse::parser::Parser>::parse_full_stmt
  17: rustc_parse::parser::stmt::<impl rustc_parse::parser::Parser>::parse_block_tail
  18: rustc_parse::parser::stmt::<impl rustc_parse::parser::Parser>::parse_block_common
  19: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item_kind
  20: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item_common_
  21: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item_common
  22: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item
  23: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_mod
  24: rustc_parse::parse_crate_from_file
  25: rustc_session::utils::<impl rustc_session::session::Session>::time
  26: rustc_interface::passes::parse
  27: rustc_interface::queries::Queries::parse
  28: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  29: rustc_span::with_source_map
  30: rustc_interface::interface::create_compiler_and_run
  31: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.50.0-nightly (b32e6e6ac 2020-12-16) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

Metadata

Metadata

Assignees

Labels

A-UnicodeArea: UnicodeA-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.D-Unicode-unawareDiagnostics: Diagnostics that are unaware of Unicode and trigger codepoint boundary assertionsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions