You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This (probably incorrect) program causes nightly rustc to panic:
use std::collections::HashMap;fnmain(){let things:HashMap<String,Vec<String>> = HashMap::new();for src in things.keys(){
things[src.as_str()].sort();}}
% RUST_BACKTRACE=1 rustc ice.rs
error: internal compiler error: broken MIR (Terminator { source_info: SourceInfo { span: ice.rs:5:9: 5:29, scope: scope4 }, kind: _17 = const std::ops::Index::index(_18, _19) -> [return: bb11, unwind: bb3] }): bad arg #0 (&std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>> <- &mut std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>): Mutability
--> ice.rs:5:28
|
5 | things[src.as_str()].sort();
| ^
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:376
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:365
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:549
5: std::panicking::begin_panic
6: rustc_errors::Handler::span_bug
7: rustc_mir::transform::type_check::TypeChecker::check_terminator
8: rustc::infer::InferCtxtBuilder::enter
9: <rustc_mir::transform::type_check::TypeckMir as rustc::mir::transform::MirPass<'tcx>>::run_pass
10: <T as rustc::mir::transform::MirMapPass<'tcx>>::run_pass
11: rustc::mir::transform::Passes::run_passes
12: rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::{{closure}}
13: rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}
14: rustc_driver::driver::phase_3_run_analysis_passes
15: rustc_driver::driver::compile_input
16: rustc_driver::run_compiler
17: std::panicking::try::do_call
18: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
19: <F as alloc::boxed::FnBox<A>>::call_box
20: std::sys::imp::thread::Thread::new::thread_start
at /checkout/src/liballoc/boxed.rs:658
at /checkout/src/libstd/sys_common/thread.rs:21
at /checkout/src/libstd/sys/unix/thread.rs:84
21: start_thread
22: __clone
This (probably incorrect) program causes nightly rustc to panic:
On the beta, instead you get:
The text was updated successfully, but these errors were encountered: