Skip to content

ICE: assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32 #83340

Closed
@L3afMe

Description

@L3afMe

Code

I tried finding a minified way to reproduce the error but couldn't manage to do it, here's where it occurs:
https://github.com/L3afMe/colou-rs/blob/master/src/main.rs#L117-L152

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (107896c32 2021-03-15)
binary: rustc
commit-hash: 107896c32d5dda4db508968ff34997a39d286966
commit-date: 2021-03-15
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', compiler/rustc_span/src/lib.rs:1513:17
Backtrace

   0: rust_begin_unwind
             at /rustc/107896c32d5dda4db508968ff34997a39d286966/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/107896c32d5dda4db508968ff34997a39d286966/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/107896c32d5dda4db508968ff34997a39d286966/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::lookup_char_pos
   6: rustc_errors::emitter::EmitterWriter::get_multispan_max_line_num
   7: <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit_diagnostic
   8: rustc_errors::json::Diagnostic::from_errors_diagnostic
   9: <rustc_errors::json::JsonEmitter as rustc_errors::emitter::Emitter>::emit_diagnostic
  10: rustc_errors::HandlerInner::emit_diagnostic
  11: rustc_errors::diagnostic_builder::DiagnosticBuilder::emit
  12: rustc_builtin_macros::format::expand_preparsed_format_args
  13: rustc_builtin_macros::format::expand_format_args_impl
  14: rustc_expand::expand::MacroExpander::fully_expand_fragment
  15: rustc_expand::expand::MacroExpander::expand_crate
  16: rustc_session::utils::<impl rustc_session::session::Session>::time
  17: rustc_interface::passes::configure_and_expand_inner
  18: rustc_interface::passes::configure_and_expand::{{closure}}
  19: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
  20: rustc_interface::passes::configure_and_expand
  21: rustc_interface::queries::Queries::expansion
  22: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  23: rustc_span::with_source_map
  24: scoped_tls::ScopedKey<T>::set

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions