Closed
Description
Input:
fn main() {
|y: Vec<[(); for x in 0..1 {}]>| {}
}
Output:
error: internal compiler error: librustc/hir/map/mod.rs:329: local_def_id: no entry for `55`, which has a map of `Some(EntryExpr(NodeId(10), 3, expr(55: {
let _result =
match ::std::iter::IntoIterator::into_iter(::std::ops::Range{start: 0,
end: 1,})
{
mut iter =>
loop {
let mut __next;
match ::std::iter::Iterator::next(&mut iter) {
::std::option::Option::Some(val) => __next = val,
::std::option::Option::None => break ,
}
let x = __next;
{ }
},
};
_result
})))`
thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:554:9
stack backtrace:
...
13: rustc::session::bug_fmt
at librustc/session/mod.rs:1256
14: rustc::hir::map::Map::local_def_id::{{closure}}
at librustc/hir/map/mod.rs:329
15: rustc::hir::map::Map::body_owner_def_id
at /home/vegard/rust/src/libcore/option.rs:376
at librustc/hir/map/mod.rs:328
at librustc/hir/map/mod.rs:510
16: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::ast_ty_to_ty
at librustc_typeck/astconv.rs:1088
17: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::create_substs_for_ast_path::{{closure}}
at librustc_typeck/astconv.rs:261
18: rustc::ty::subst::<impl rustc::ty::Slice<rustc::ty::subst::Kind<'tcx>>>::fill_item
at /home/vegard/rust/src/librustc/ty/subst.rs:260
at /home/vegard/rust/src/librustc/ty/subst.rs:235
19: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::create_substs_for_ast_path
at /home/vegard/rust/src/librustc/ty/subst.rs:203
at librustc_typeck/astconv.rs:243
20: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::ast_path_substs_for_ty
at librustc_typeck/astconv.rs:176
at /home/vegard/rust/src/librustc/hir/mod.rs:366
at librustc_typeck/astconv.rs:175
21: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::def_to_ty
at librustc_typeck/astconv.rs:555
at librustc_typeck/astconv.rs:964
22: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::ast_ty_to_ty
at librustc_typeck/astconv.rs:1074
23: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::supplied_sig_of_closure
at librustc_typeck/check/closure.rs:604
at /home/vegard/rust/src/libcore/ops/function.rs:271
at /home/vegard/rust/src/libcore/option.rs:404
at /home/vegard/rust/src/libcore/iter/mod.rs:1347
at /home/vegard/rust/src/libcore/iter/mod.rs:814
at /home/vegard/rust/src/librustc_data_structures/array_vec.rs:197
at /home/vegard/rust/src/librustc_data_structures/accumulate_vec.rs:113
at /home/vegard/rust/src/libcore/iter/iterator.rs:1375
at /home/vegard/rust/src/librustc/ty/context.rs:2729
at /home/vegard/rust/src/librustc/ty/context.rs:2717
at /home/vegard/rust/src/librustc/ty/context.rs:2569
at librustc_typeck/check/closure.rs:610
...
Complete output
error: internal compiler error: librustc/hir/map/mod.rs:329: local_def_id: no entry for `55`, which has a map of `Some(EntryExpr(NodeId(10), 3, expr(55: {
let _result =
match ::std::iter::IntoIterator::into_iter(::std::ops::Range{start: 0,
end: 1,})
{
mut iter =>
loop {
let mut __next;
match ::std::iter::Iterator::next(&mut iter) {
::std::option::Option::Some(val) => __next = val,
::std::option::Option::None => break ,
}
let x = __next;
{ }
},
};
_result
})))`
thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:554:9
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at libstd/sys_common/backtrace.rs:59
at libstd/panicking.rs:211
3: std::panicking::default_hook
at libstd/panicking.rs:227
4: rustc::util::common::panic_hook
at librustc/util/common.rs:54
5: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:467
6: std::panicking::begin_panic
at /home/vegard/rust/src/libstd/panicking.rs:397
7: rustc_errors::Handler::bug
at librustc_errors/lib.rs:554
8: rustc::session::opt_span_bug_fmt::{{closure}}
at librustc/session/mod.rs:1280
9: rustc::ty::context::tls::with_opt::{{closure}}
at librustc/ty/context.rs:1943
10: rustc::ty::context::tls::with_context_opt
at librustc/ty/context.rs:1880
11: rustc::ty::context::tls::with_opt
at librustc/ty/context.rs:1943
12: rustc::session::opt_span_bug_fmt
at librustc/session/mod.rs:1276
13: rustc::session::bug_fmt
at librustc/session/mod.rs:1256
14: rustc::hir::map::Map::local_def_id::{{closure}}
at librustc/hir/map/mod.rs:329
15: rustc::hir::map::Map::body_owner_def_id
at /home/vegard/rust/src/libcore/option.rs:376
at librustc/hir/map/mod.rs:328
at librustc/hir/map/mod.rs:510
16: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::ast_ty_to_ty
at librustc_typeck/astconv.rs:1088
17: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::create_substs_for_ast_path::{{closure}}
at librustc_typeck/astconv.rs:261
18: rustc::ty::subst::<impl rustc::ty::Slice<rustc::ty::subst::Kind<'tcx>>>::fill_item
at /home/vegard/rust/src/librustc/ty/subst.rs:260
at /home/vegard/rust/src/librustc/ty/subst.rs:235
19: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::create_substs_for_ast_path
at /home/vegard/rust/src/librustc/ty/subst.rs:203
at librustc_typeck/astconv.rs:243
20: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::ast_path_substs_for_ty
at librustc_typeck/astconv.rs:176
at /home/vegard/rust/src/librustc/hir/mod.rs:366
at librustc_typeck/astconv.rs:175
21: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::def_to_ty
at librustc_typeck/astconv.rs:555
at librustc_typeck/astconv.rs:964
22: <rustc_typeck::astconv::AstConv<'gcx, 'tcx> + 'o>::ast_ty_to_ty
at librustc_typeck/astconv.rs:1074
23: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::supplied_sig_of_closure
at librustc_typeck/check/closure.rs:604
at /home/vegard/rust/src/libcore/ops/function.rs:271
at /home/vegard/rust/src/libcore/option.rs:404
at /home/vegard/rust/src/libcore/iter/mod.rs:1347
at /home/vegard/rust/src/libcore/iter/mod.rs:814
at /home/vegard/rust/src/librustc_data_structures/array_vec.rs:197
at /home/vegard/rust/src/librustc_data_structures/accumulate_vec.rs:113
at /home/vegard/rust/src/libcore/iter/iterator.rs:1375
at /home/vegard/rust/src/librustc/ty/context.rs:2729
at /home/vegard/rust/src/librustc/ty/context.rs:2717
at /home/vegard/rust/src/librustc/ty/context.rs:2569
at librustc_typeck/check/closure.rs:610
24: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::sig_of_closure_no_expectation
at librustc_typeck/check/closure.rs:379
25: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::check_closure
at librustc_typeck/check/closure.rs:365
at librustc_typeck/check/closure.rs:88
26: rustc_typeck::check::FnCtxt::check_expr_kind
at librustc_typeck/check/closure.rs:66
at librustc_typeck/check/mod.rs:3910
27: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_needs
at librustc_typeck/check/mod.rs:3530
28: rustc_typeck::check::FnCtxt::check_block_with_expected::{{closure}}
at librustc_typeck/check/mod.rs:2864
at librustc_typeck/check/mod.rs:4366
at /home/vegard/rust/src/libcore/option.rs:404
at librustc_typeck/check/mod.rs:4366
29: rustc_typeck::check::FnCtxt::check_block_with_expected
at librustc_typeck/check/mod.rs:5070
at librustc_typeck/check/mod.rs:4359
30: rustc_typeck::check::FnCtxt::check_expr_kind
at librustc_typeck/check/mod.rs:3913
31: rustc_typeck::check::FnCtxt::check_expr_with_expectation_and_needs
at librustc_typeck/check/mod.rs:3530
32: rustc_typeck::check::FnCtxt::check_return_expr
at librustc_typeck/check/mod.rs:2864
at librustc_typeck/check/mod.rs:2858
at librustc_typeck/check/mod.rs:2996
33: rustc_typeck::check::check_fn
at librustc_typeck/check/mod.rs:1081
34: rustc_typeck::check::typeck_tables_of::{{closure}}
at librustc_typeck/check/mod.rs:871
35: rustc_typeck::check::typeck_tables_of
at librustc_typeck/check/mod.rs:617
at /home/vegard/rust/src/librustc/infer/mod.rs:453
at /home/vegard/rust/src/librustc/ty/context.rs:1578
at /home/vegard/rust/src/librustc/ty/context.rs:1844
at /home/vegard/rust/src/librustc/ty/context.rs:1787
at /home/vegard/rust/src/librustc/ty/context.rs:1843
at /home/vegard/rust/src/librustc/ty/context.rs:1577
at /home/vegard/rust/src/librustc/ty/context.rs:1905
at /home/vegard/rust/src/librustc/ty/context.rs:1889
at /home/vegard/rust/src/librustc/ty/context.rs:1880
at /home/vegard/rust/src/librustc/ty/context.rs:1889
at /home/vegard/rust/src/librustc/ty/context.rs:1900
at /home/vegard/rust/src/librustc/ty/context.rs:1570
at /home/vegard/rust/src/librustc/infer/mod.rs:453
at librustc_typeck/check/mod.rs:617
at librustc_typeck/check/mod.rs:855
36: rustc::dep_graph::graph::DepGraph::with_task_impl
at librustc/ty/maps/plumbing.rs:723
at librustc/dep_graph/graph.rs:343
37: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
at librustc/dep_graph/graph.rs:209
at librustc/ty/maps/plumbing.rs:530
at librustc/ty/maps/plumbing.rs:200
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1787
at librustc/ty/context.rs:1843
at librustc/ty/maps/plumbing.rs:199
at librustc/ty/context.rs:1905
at librustc/ty/context.rs:1889
at librustc/ty/context.rs:1880
at librustc/ty/context.rs:1889
at librustc/ty/context.rs:1900
at librustc/ty/maps/plumbing.rs:189
at librustc/ty/maps/plumbing.rs:523
38: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
at librustc/ty/maps/plumbing.rs:372
at librustc/ty/maps/plumbing.rs:599
at librustc/ty/maps/plumbing.rs:606
39: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure
at librustc/ty/maps/plumbing.rs:574
at librustc/ty/maps/plumbing.rs:740
40: rustc_typeck::check::typeck_item_bodies
at librustc_typeck/check/mod.rs:715
at /home/vegard/rust/src/librustc/session/mod.rs:318
at librustc_typeck/check/mod.rs:713
41: rustc::dep_graph::graph::DepGraph::with_task_impl
at librustc/ty/maps/plumbing.rs:723
at librustc/dep_graph/graph.rs:343
42: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
at librustc/dep_graph/graph.rs:209
at librustc/ty/maps/plumbing.rs:530
at librustc/ty/maps/plumbing.rs:200
at librustc/ty/context.rs:1844
at librustc/ty/context.rs:1787
at librustc/ty/context.rs:1843
at librustc/ty/maps/plumbing.rs:199
at librustc/ty/context.rs:1905
at librustc/ty/context.rs:1889
at librustc/ty/context.rs:1880
at librustc/ty/context.rs:1889
at librustc/ty/context.rs:1900
at librustc/ty/maps/plumbing.rs:189
at librustc/ty/maps/plumbing.rs:523
43: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
at librustc/ty/maps/plumbing.rs:372
at librustc/ty/maps/plumbing.rs:599
at librustc/ty/maps/plumbing.rs:606
44: rustc_typeck::check_crate
at librustc_typeck/check/mod.rs:706
at librustc_typeck/lib.rs:344
at /home/vegard/rust/src/librustc/util/common.rs:166
at /home/vegard/rust/src/librustc/util/common.rs:160
at librustc_typeck/lib.rs:344
45: rustc::ty::context::TyCtxt::create_and_enter
at librustc_driver/driver.rs:1121
at /home/vegard/rust/src/librustc/ty/context.rs:1867
at /home/vegard/rust/src/librustc/ty/context.rs:1844
at /home/vegard/rust/src/librustc/ty/context.rs:1787
at /home/vegard/rust/src/librustc/ty/context.rs:1843
at /home/vegard/rust/src/librustc/ty/context.rs:1866
at /home/vegard/rust/src/librustc/ty/context.rs:1833
at /home/vegard/rust/src/libstd/thread/local.rs:294
at /home/vegard/rust/src/libstd/thread/local.rs:248
at /home/vegard/rust/src/librustc/ty/context.rs:1825
at /home/vegard/rust/src/libstd/thread/local.rs:294
at /home/vegard/rust/src/libstd/thread/local.rs:248
at /home/vegard/rust/src/librustc/ty/context.rs:1817
at /home/vegard/rust/src/librustc/ty/context.rs:1855
at /home/vegard/rust/src/librustc/ty/context.rs:1299
46: rustc_driver::driver::compile_input
at librustc_driver/driver.rs:1095
at librustc_driver/driver.rs:231
47: rustc_driver::run_compiler
at librustc_driver/lib.rs:540
at librustc_driver/lib.rs:457
at /home/vegard/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.1/src/lib.rs:155
at /home/vegard/rust/src/libsyntax/lib.rs:97
at /home/vegard/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.1/src/lib.rs:155
at /home/vegard/rust/src/libsyntax/lib.rs:96
at librustc_driver/lib.rs:456
48: rustc_driver::monitor::{{closure}}
at librustc_driver/lib.rs:1684
at librustc_driver/lib.rs:174
at librustc_driver/lib.rs:1598
49: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
50: rustc_driver::run
at /home/vegard/rust/src/libstd/panicking.rs:289
at /home/vegard/rust/src/libstd/panic.rs:374
at librustc_driver/lib.rs:1530
at librustc_driver/lib.rs:1597
at librustc_driver/lib.rs:173
51: rustc_driver::main
at librustc_driver/lib.rs:1677
52: std::rt::lang_start::{{closure}}
at /home/vegard/rust/src/libstd/rt.rs:74
53: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:310
54: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
55: std::rt::lang_start_internal
at libstd/panicking.rs:289
at libstd/panic.rs:374
at libstd/rt.rs:58
56: main
57: __libc_start_main
58: _start
query stack during panic:
#0 [typeck_tables_of] processing `main`
#1 [typeck_item_bodies] type-checking all item bodies
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.27.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z external-macro-backtrace
I'm on commit c166b03.