Closed
Description
This code triggers an ICE:
use std::collections::*;
pub enum A {a}
fn main() {
let xs = HashSet::new();
xs.contains(&A::DoesntExist);
}
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/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: 5 }, true), last_private: LastMod(AllPublic), depth: 1 }', C:/bot/slave/nightly-dist-rustc-win-gnu-64/build/src/librustc\middle\def.rs:81
stack backtrace:
1: 0x63cb9009 - sys::backtrace::write::hbf05e078e24af39fhos
2: 0x63cc24b6 - rt::unwind::register::h82ac513e119c8c9fX2v
3: 0x63c85216 - rt::unwind::begin_unwind_inner::h1126581147898f676Zv
4: 0x63c85bc7 - rt::unwind::begin_unwind_fmt::h169e83bb23b1c4adcZv
5: 0x6d5af856 - middle::ty::resolve_expr::h620f249100bb5a69Zp9
6: 0x6d6fb666 - middle::ty::expr_kind::h3f5acaec9f666cfa5r9
7: 0x6d6fb459 - middle::ty::expr_is_lval::he5805dd8c49ad3142q9
8: 0x7b5b1a - check::UnresolvedTypeAction...std..clone..Clone::clone::ha3dba94ad03aaf061Rp
9: 0x78e029 - check::callee::CallResolution<'tcx>.DeferredCallResolution<'tcx>::resolve::h3351210ce535c238Ojm
10: 0x78f759 - check::callee::CallResolution<'tcx>.DeferredCallResolution<'tcx>::resolve::h3351210ce535c238Ojm
11: 0x7ba140 - check::may_break::hbb9ba306bd1d5487zEt
12: 0x7e2cf1 - check::may_break::hbb9ba306bd1d5487zEt
13: 0x7f3674 - check::check_stmt::h4d316e8fc14d786a2ms
14: 0x7a53ab - check::GatherLocalsVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h7a12a74a153228d9sZn
15: 0x7888fa - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::h2e717bd79922c179tWo
16: 0x79f9fe - check::check_item_types::h6ceed96b60bdb1f7RMn
17: 0x79da96 - check::check_item_body::hfd06d8a5180c7abadgo
18: 0x79f644 - check::check_item_types::h6ceed96b60bdb1f7RMn
19: 0x8569aa - check_crate::h5b156b3b307798df98C
20: 0x6fca0ff3 - driver::phase_3_run_analysis_passes::h7cdd2757022e69b7GGa
21: 0x6fc82b40 - driver::compile_input::hd3c2c22595f08a0dQba
22: 0x6fd36f64 - run_compiler::h240f1371549aa104n6b
23: 0x6fd34b0f - run::he7af85fec9d5c95635b
24: 0x6fd34409 - run::he7af85fec9d5c95635b
25: 0x63cfc8bc - rust_try
26: 0x63cfc899 - rust_try
27: 0x63cad929 - rt::unwind::try::inner_try::h4474d627913bcf79ZVv
28: 0x6fd345d8 - run::he7af85fec9d5c95635b
29: 0x63cc0674 - sys::process::Command::cwd::ha5f7446f3da2500ftHu
30: 0x76d759cd - BaseThreadInitThunk
This ICE is especially annoying because rustc doesn't give any other error message. It gives no indication of where the problem is in your code.
Metadata
Metadata
Assignees
Labels
No labels