Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created March 23, 2017 16:18
Show Gist options
  • Save nikomatsakis/613c5e570a4054ad2b2eddb60f58ba7b to your computer and use it in GitHub Desktop.
Save nikomatsakis/613c5e570a4054ad2b2eddb60f58ba7b to your computer and use it in GitHub Desktop.
error: main function not found
error: internal compiler error: src/librustc/hir/map/mod.rs:379: local_def_id: no entry for `22`, which has a map of `Some(EntryExpr(NodeId(20), expr(22: ::std::ops::RangeTo{end: 10,})))`
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:417
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: rustc_errors::Handler::bug
at ./src/librustc_errors/lib.rs:417
1: <std::thread::local::LocalKey<T>>::with
at ./src/librustc/session/mod.rs:786
at ./src/librustc/ty/context.rs:924
at ./src/librustc/ty/context.rs:913
at ./src/libstd/thread/local.rs:253
2: rustc::ty::context::tls::with
at ./src/librustc/ty/context.rs:909
3: rustc::ty::context::tls::with_opt
at ./src/librustc/ty/context.rs:924
4: rustc::session::opt_span_bug_fmt
at ./src/librustc/session/mod.rs:782
5: rustc::session::bug_fmt
at ./src/librustc/session/mod.rs:766
6: rustc::hir::map::Map::local_def_id
at ./src/librustc/hir/map/mod.rs:379
at ./src/libcore/option.rs:358
at ./src/librustc/hir/map/mod.rs:378
7: rustc_const_eval::eval::eval_length
at ./src/librustc_const_eval/eval.rs:230
at ./src/librustc_const_eval/eval.rs:962
8: rustc_typeck::check::FnCtxt::check_expr_kind
at ./src/librustc_typeck/check/mod.rs:3512
9: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref
at ./src/librustc_typeck/check/mod.rs:3086
10: rustc_typeck::check::FnCtxt::check_expr_struct_fields
at ./src/librustc_typeck/check/mod.rs:2412
at ./src/librustc_typeck/check/mod.rs:2406
at ./src/librustc_typeck/check/mod.rs:2399
at ./src/librustc_typeck/check/mod.rs:2906
11: rustc_typeck::check::FnCtxt::check_expr_struct
at ./src/librustc_typeck/check/mod.rs:3034
12: rustc_typeck::check::FnCtxt::check_expr_kind
at ./src/librustc_typeck/check/mod.rs:3579
13: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref
at ./src/librustc_typeck/check/mod.rs:3086
14: rustc_typeck::check::FnCtxt::check_block_with_expected
at ./src/librustc_typeck/check/mod.rs:2412
at ./src/librustc_typeck/check/mod.rs:3838
15: rustc_typeck::check::FnCtxt::check_expr_kind
at ./src/librustc_typeck/check/mod.rs:3441
16: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_lvalue_pref
at ./src/librustc_typeck/check/mod.rs:3086
17: rustc_typeck::check::check_fn
at ./src/librustc_typeck/check/mod.rs:2412
at ./src/librustc_typeck/check/mod.rs:2406
at ./src/librustc_typeck/check/mod.rs:2399
at ./src/librustc_typeck/check/mod.rs:822
18: <std::thread::local::LocalKey<T>>::with
at ./src/librustc_typeck/check/mod.rs:666
at ./src/librustc_typeck/check/mod.rs:485
at ./src/librustc/infer/mod.rs:533
at ./src/librustc/ty/context.rs:897
at ./src/libstd/thread/local.rs:253
19: rustc::ty::context::tls::enter
at ./src/librustc/ty/context.rs:894
20: rustc::ty::context::GlobalCtxt::enter_local
at ./src/librustc/ty/context.rs:739
21: rustc::infer::InferCtxtBuilder::enter
at ./src/librustc/infer/mod.rs:533
22: rustc_typeck::check::InheritedBuilder::enter
at ./src/librustc_typeck/check/mod.rs:485
23: rustc_typeck::check::typeck_tables
at ./src/librustc_typeck/check/mod.rs:651
24: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
at ./src/librustc/ty/maps.rs:312
at ./src/librustc/ty/maps.rs:129
25: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables<'tcx>>::try_get_with
at ./src/librustc/ty/maps.rs:312
26: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables<'tcx>>::get
at ./src/librustc/ty/maps.rs:312
at ./src/librustc/ty/maps.rs:312
27: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::item_tables
at ./src/librustc/ty/mod.rs:1957
28: rustc::dep_graph::visit::visit_all_bodies_in_krate
at ./src/librustc_typeck/check/mod.rs:545
at ./src/librustc/dep_graph/visit.rs:84
29: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::visit_all_bodies_in_krate
at ./src/librustc/ty/mod.rs:2604
30: rustc::dep_graph::graph::DepGraph::with_task
at ./src/librustc_typeck/check/mod.rs:544
at ./src/librustc/dep_graph/graph.rs:83
31: rustc::session::Session::track_errors
at ./src/librustc_typeck/check/mod.rs:543
at ./src/librustc/session/mod.rs:234
32: rustc_typeck::check::check_item_bodies
at ./src/librustc_typeck/check/mod.rs:542
33: rustc::util::common::time
at ./src/librustc_typeck/lib.rs:323
at ./src/librustc/util/common.rs:48
34: rustc_typeck::check_crate
at ./src/librustc_typeck/lib.rs:323
35: <std::thread::local::LocalKey<T>>::with
at ./src/librustc_driver/driver.rs:919
at ./src/librustc/ty/context.rs:897
at ./src/libstd/thread/local.rs:253
36: rustc::ty::context::tls::enter
at ./src/librustc/ty/context.rs:894
37: <std::thread::local::LocalKey<T>>::with
at ./src/librustc/ty/context.rs:881
at ./src/libstd/thread/local.rs:253
38: rustc::ty::context::tls::enter_global
at ./src/librustc/ty/context.rs:878
39: rustc::ty::context::TyCtxt::create_and_enter
at ./src/librustc/ty/context.rs:690
40: rustc_driver::driver::phase_3_run_analysis_passes
at ./src/librustc_driver/driver.rs:889
41: rustc_driver::driver::compile_input
at ./src/librustc_driver/driver.rs:168
42: rustc_driver::run_compiler
at ./src/librustc_driver/lib.rs:221
43: <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once
at ./src/librustc_driver/lib.rs:1130
at ./src/librustc_driver/lib.rs:137
at ./src/librustc_driver/lib.rs:1064
at ./src/libstd/panic.rs:296
44: __rust_maybe_catch_panic
at ./src/libpanic_unwind/lib.rs:98
45: std::panicking::try
at ./src/libstd/panicking.rs:433
46: std::panic::catch_unwind
at ./src/libstd/panic.rs:361
47: <F as alloc::boxed::FnBox<A>>::call_box
at ./src/libstd/thread/mod.rs:360
at ./src/liballoc/boxed.rs:638
48: std::sys::imp::thread::Thread::new::thread_start
at ./src/libstd/sys_common/thread.rs:21
at ./src/libstd/sys/unix/thread.rs:84
49: start_thread
50: clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment