Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: No entry found for key #67407

Closed
DutchGhost opened this issue Dec 18, 2019 · 1 comment
Closed

ICE: No entry found for key #67407

DutchGhost opened this issue Dec 18, 2019 · 1 comment

Comments

@DutchGhost
Copy link
Contributor

DutchGhost commented Dec 18, 2019

The following ICE's on stable only:

struct Bug {
    inner: [(); match Vec::new {
        n => n().len(),
        f @  || @ f => 1
    }],
}
Backtrace:

  Compiling playground v0.0.1 (/playground)
error: expected binding pattern, found `||`
 --> src/lib.rs:6:14
  |
6 |         f @  || @ f => 1
  |              ^^ expected binding pattern

thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1190:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:76
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:60
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1030
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:64
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:196
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:210
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  12: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:380
  13: rust_begin_unwind
             at src/libstd/panicking.rs:307
  14: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  15: core::option::expect_failed
             at src/libcore/option.rs:1190
  16: rustc_mir::build::expr::as_place::<impl rustc_mir::build::Builder>::expr_as_place
  17: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  18: rustc_mir::build::expr::as_temp::<impl rustc_mir::build::Builder>::expr_as_temp
  19: rustc_mir::build::expr::as_operand::<impl rustc_mir::build::Builder>::expr_as_operand
  20: rustc_mir::build::expr::as_operand::<impl rustc_mir::build::Builder>::expr_as_operand
  21: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  22: rustc_mir::build::expr::as_temp::<impl rustc_mir::build::Builder>::expr_as_temp
  23: rustc_mir::build::expr::as_place::<impl rustc_mir::build::Builder>::expr_as_place
  24: rustc_mir::build::expr::as_rvalue::<impl rustc_mir::build::Builder>::expr_as_rvalue
  25: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  26: rustc_mir::build::expr::as_temp::<impl rustc_mir::build::Builder>::expr_as_temp
  27: rustc_mir::build::expr::as_operand::<impl rustc_mir::build::Builder>::expr_as_operand
  28: rustc_mir::build::expr::as_operand::<impl rustc_mir::build::Builder>::expr_as_operand
  29: rustc_mir::build::expr::as_operand::<impl rustc_mir::build::Builder>::as_local_operand
  30: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  31: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
  32: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  33: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  34: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  35: rustc_mir::build::scope::<impl rustc_mir::build::Builder>::in_scope
  36: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
  37: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  38: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  39: rustc_mir::build::expr::into::<impl rustc_mir::build::Builder>::into_expr
  40: rustc_mir::build::construct_const
  41: rustc::ty::context::tls::with_context::{{closure}}
  42: rustc_mir::build::mir_build
  43: rustc_mir::transform::mir_built
  44: rustc::ty::query::__query_compute::mir_built
  45: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_built>::compute
  46: rustc::dep_graph::graph::DepGraph::with_task_impl
  47: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  48: rustc_mir::transform::check_unsafety::unsafety_check_result
  49: rustc::ty::query::__query_compute::unsafety_check_result
  50: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::unsafety_check_result>::compute
  51: rustc::dep_graph::graph::DepGraph::with_task_impl
  52: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  53: rustc_mir::transform::mir_const
  54: rustc::ty::query::__query_compute::mir_const
  55: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_const>::compute
  56: rustc::dep_graph::graph::DepGraph::with_task_impl
  57: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  58: rustc_mir::transform::qualify_consts::mir_const_qualif
  59: rustc::ty::query::__query_compute::mir_const_qualif
  60: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_const_qualif>::compute
  61: rustc::dep_graph::graph::DepGraph::with_task_impl
  62: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  63: rustc_mir::transform::mir_validated
  64: rustc::ty::query::__query_compute::mir_validated
  65: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_validated>::compute
  66: rustc::dep_graph::graph::DepGraph::with_task_impl
  67: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  68: rustc_mir::borrow_check::mir_borrowck
  69: rustc::ty::query::__query_compute::mir_borrowck
  70: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_borrowck>::compute
  71: rustc::dep_graph::graph::DepGraph::with_task_impl
  72: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  73: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::ensure_query
  74: rustc_mir::transform::optimized_mir
  75: rustc::ty::query::__query_compute::optimized_mir
  76: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::optimized_mir>::compute
  77: rustc::dep_graph::graph::DepGraph::with_task_impl
  78: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  79: rustc_mir::interpret::eval_context::InterpCx<M>::load_mir
  80: rustc_mir::const_eval::const_eval_raw_provider
  81: rustc::ty::query::__query_compute::const_eval_raw
  82: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::const_eval_raw>::compute
  83: rustc::dep_graph::graph::DepGraph::with_task_impl
  84: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  85: rustc_mir::const_eval::const_eval_provider
  86: rustc::ty::query::__query_compute::const_eval
  87: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::const_eval>::compute
  88: rustc::dep_graph::graph::DepGraph::with_task_impl
  89: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  90: rustc_mir::const_eval::const_eval_provider
  91: rustc::ty::query::__query_compute::const_eval
  92: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::const_eval>::compute
  93: rustc::dep_graph::graph::DepGraph::with_task_impl
  94: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  95: rustc::ty::sty::Const::eval
  96: <rustc::traits::project::AssocTypeNormalizer as rustc::ty::fold::TypeFolder>::fold_ty
  97: rustc::traits::project::normalize
  98: rustc_typeck::check::FnCtxt::normalize_associated_types_in
  99: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
 100: rustc::ty::context::GlobalCtxt::enter_local
 101: rustc_typeck::check::wfcheck::check_item_well_formed
 102: rustc::ty::query::__query_compute::check_item_well_formed
 103: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::check_item_well_formed>::compute
 104: rustc::dep_graph::graph::DepGraph::with_task_impl
 105: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

note: rustc 1.39.0 (4560ea788 2019-11-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [mir_built] processing `Bug::inner::{{constant}}#0`
#1 [unsafety_check_result] processing `Bug::inner::{{constant}}#0`
#2 [mir_const] processing `Bug::inner::{{constant}}#0`
#3 [mir_const_qualif] processing `Bug::inner::{{constant}}#0`
#4 [mir_validated] processing `Bug::inner::{{constant}}#0`
#5 [mir_borrowck] processing `Bug::inner::{{constant}}#0`
#6 [optimized_mir] processing `Bug::inner::{{constant}}#0`
 --> src/lib.rs:4:17
  |
4 |     inner: [(); match Vec::new {
  |                 ^^^^^^^^^^^^^^
#7 [const_eval_raw] const-evaluating `Bug::inner::{{constant}}#0`
#8 [const_eval] const-evaluating + checking `Bug::inner::{{constant}}#0`
#9 [const_eval] const-evaluating + checking `Bug::inner::{{constant}}#0`
#10 [check_item_well_formed] processing `Bug`
#11 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

error: could not compile `playground`.

Might be related to #66742.

@jonas-schievink
Copy link
Contributor

Closing since this does not happen on nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants