Closed
Description
I tried to match on a mpsc::RecvError, but used the wrong name for variant. I expected rustc to just error, but instead it als gives a ICE.
backtrace:
Compiling program_name v0.1.0
(file:///home/username/Documents/program_name)
error: no associated item named `Disconnected` found for type
`std::sync::mpsc::RecvError` in the current scope
--> src/connection.rs:51:25
|>
51 |> mpsc::RecvError::Disconnected =>
panic!("{}: Channel disconnected", name),
|> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: internal compiler error: ../src/librustc/hir/def.rs:77: path not
fully resolved: PathResolution { base_def: Struct(DefId { krate: 1,
node: DefIndex(9527) }), depth: 1 }
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>', ../src/librustc_errors/lib.rs:619
stack backtrace:
1: 0xb72e1a04 -
std::sys::backtrace::tracing::imp::write::h46e546df6e4e4fe6
2: 0xb72efd11 -
std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h077deeda8b799591
3: 0xb72ef84f - std::panicking::default_hook::heb8b6fd640571a4f
4: 0xb72b06a1 - std::panicking::rust_panic_with_hook::hd7b83626099d3416
5: 0xb2e5d109 - std::panicking::begin_panic::h3e029d5f110b4661
6: 0xb2e5c9ae - rustc_errors::Handler::bug::he60f76b829c68950
7: 0xb582717f -
rustc::session::opt_span_bug_fmt::_$u7b$$u7b$closure$u7d$$u7d$::h11fa08f71c1e9d84
8: 0xb5826f7e - rustc::session::opt_span_bug_fmt::hdc2517bf24a762d0
9: 0xb5842c84 - rustc::session::bug_fmt::h4bff3cf11871f37a
10: 0xb59d78ca - rustc::ty::_<impl rustc..ty..context..TyCtxt<'a,
'gcx, 'tcx>>::expect_def_or_none::h07b49a2a0fdf52e8
11: 0xb59d66fe -
rustc::middle::mem_categorization::MemCategorizationContext::cat_pattern_::h01f4371d13252b98
12: 0xb59d6400 -
rustc::middle::expr_use_visitor::ExprUseVisitor::determine_pat_move_mode::h35b758a9e58f84f0
13: 0xb59d295e -
rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr::h42b1b146396e8865
14: 0xb59d148c -
rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr::hb63bd6c8ee50446b
15: 0xb59d2a64 -
rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr::h42b1b146396e8865
16: 0xb59d148c -
rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr::hb63bd6c8ee50446b
17: 0xb59d3ceb -
rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr::h42b1b146396e8865
18: 0xb59d148c -
rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr::hb63bd6c8ee50446b
19: 0xb59d112a -
rustc::middle::expr_use_visitor::ExprUseVisitor::walk_fn::hc0b41532d76f9da2
20: 0xb68c7950 - _<rustc_typeck..check..upvar..AdjustBorrowKind<'a,
'gcx, 'tcx> as
rustc..hir..intravisit..Visitor<'v>>::visit_fn::hac0cda0adef5191e
21: 0xb68c771e - rustc::hir::intravisit::walk_expr::h8a429e7982d89eff
22: 0xb68c71ab - rustc::hir::intravisit::walk_expr::h8a429e7982d89eff
23: 0xb68c692f -
rustc::hir::intravisit::Visitor::visit_stmt::h36691077ce4975a7
24: 0xb680e958 - rustc_typeck::check::upvar::_<impl
rustc_typeck..check..FnCtxt<'a, 'gcx,
'tcx>>::closure_analyze_fn::he659d9a48ac420ac
25: 0xb6807edf - rustc_typeck::check::check_bare_fn::h5ed20477e5cc44fd
26: 0xb681f1bb -
rustc_typeck::check::check_method_body::ha4e0da5e2088f964
27: 0xb6802740 - rustc_typeck::check::check_item_body::h25e99857a1b6c208
28: 0xb67f917a -
rustc_typeck::check::check_item_bodies::h08d9f21c4dd4ed7a
29: 0xb67eead8 - rustc_typeck::check_crate::h1d947f5c8edea4a9
30: 0xb7634d5d -
rustc_driver::driver::phase_3_run_analysis_passes::_$u7b$$u7b$closure$u7d$$u7d$::hded790081e457a76
31: 0xb7632aec -
rustc::ty::context::TyCtxt::create_and_enter::h7622c0f52ea2e7fe
32: 0xb75f0b39 - rustc_driver::driver::compile_input::hdfe4405d66704c31
33: 0xb75db484 - rustc_driver::run_compiler::h581448fb74257353
34: 0xb75d8243 - std::panicking::try::call::hf081e8ea5e252d1a
35: 0xb72fdac7 - __rust_try
36: 0xb72fda5d - __rust_maybe_catch_panic
37: 0xb75d8de5 - _<F as
alloc..boxed..FnBox<A>>::call_box::h2d5dcb354b3ff8db
38: 0xb72edce9 -
std::sys::thread::Thread::new::thread_start::hf2eed4b6f7149599
39: 0xb2d4af71 - start_thread
40: 0xb711ef8d - clone
41: 0x0 - <unknown>
error: Could not compile `userspace_cluster_os`.
To learn more, run the command again with --verbose.
rust version: 1.11.0?
I am sure it is a stable rustc