Closed
Description
Consider this code
fn foo() {
static map: u64 = 0;
}
Because the compiler complained, that map
should be ALL_UPPERCASE, I renamed the variable to MAP
and it ICEs.
Steps to reproduce:
- create a new cargo project (doesn't matter if lib or main)
- Use the snippet above
cargo build
- change the case of any/all letters of map (e.g. change it to
MAP
) cargo build
- 💥
error: internal compiler error: src/librustc/dep_graph/graph.rs:610: DepNode Hir(1ab623b223f48ebe-bfb096ebac3aaa81) should have been pre-allocated but wasn't.
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:588:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:482
6: std::panicking::begin_panic
7: rustc_errors::Handler::bug
8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
9: rustc::ty::context::tls::with_opt::{{closure}}
10: rustc::ty::context::tls::with_context_opt
11: rustc::ty::context::tls::with_opt
12: rustc::util::bug::opt_span_bug_fmt
13: rustc::util::bug::bug_fmt
14: rustc::dep_graph::graph::DepGraph::try_mark_green
15: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::ensure_query
16: rustc::session::Session::track_errors
17: rustc::util::common::time
18: rustc_typeck::check_crate
19: <std::thread::local::LocalKey<T>>::with
20: rustc::ty::context::TyCtxt::create_and_enter
21: rustc_driver::driver::compile_input
22: rustc_driver::run_compiler_with_pool
23: <scoped_tls::ScopedKey<T>>::set
24: rustc_driver::run_compiler
25: <scoped_tls::ScopedKey<T>>::set
query stack during panic:
end of query stack
error: aborting due to previous error
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.33.0-nightly (ceb251214 2019-01-16) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
Was introduced at nightly-2019-01-14 so some of the commits between 75a369c...2fadb0a are to blame