Closed
Description
(edit from @pnkfelix: if you're looking at this bug, make sure to skip ahead to the comments to see where people have posted links to self-contained reductions to reproduce the bug.)
To reproduce: on the latest nightly, clone https://github.com/elidupree/time-steward (commit ac2db9f6765eeb18692d8588162bc076c9f198c1) and run cargo test
, but replace tests/paces.rs:85-88 with:
paces:: <flat_to_inefficient_full::Steward <Basics,
flat_to_inefficient_full::Steward <Basics, memoized_flat::Steward <Basics>>
When I did this, I got:
error: internal compiler error: ../src/librustc/infer/mod.rs:686: Encountered errors `[FulfillmentError(Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { trait_ref: <&'a steward::stewards::memoized_flat::Snapshot<Basics> as std::iter::IntoIterator>, item_name: Item(116) }, (steward::FieldId, (&'a std::sync::Arc<std::any::Any + 'static>, &'a steward::GenericExtendedTime<steward::DeterministicRandomId>)))),depth=1),MismatchedProjectionTypes(RegionsInsufficientlyPolymorphic(BrNamed(11:DefIndex(3742), 'a(112), WontChange), '_#0r)))]` resolving bounds after type-checking
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:590
stack backtrace:
1: 0x7f7b93670a63 - std::sys::backtrace::tracing::imp::write::h46f28e67d38b4637
2: 0x7f7b936816ad - std::panicking::default_hook::{{closure}}::h1d3243f546573ff4
3: 0x7f7b9367fc4e - std::panicking::default_hook::h96c288d728df3ebf
4: 0x7f7b93680338 - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db
5: 0x7f7b906f87a8 - std::panicking::begin_panic::hb7c71bbc491f561c
6: 0x7f7b909a4035 - rustc::session::opt_span_bug_fmt::{{closure}}::h0a2486f2fff54208
7: 0x7f7b908fb095 - rustc::session::opt_span_bug_fmt::hfa9cff626b4f2b49
8: 0x7f7b908faf24 - rustc::session::span_bug_fmt::heb3fdb6acac8d0c7
9: 0x7f7b9084e537 - rustc::infer::InferCtxt::drain_fulfillment_cx_or_panic::h1cc701f94300c6bb
10: 0x7f7b909466fc - rustc::ty::layout::normalize_associated_type::hcfa61530a7886901
11: 0x7f7b909469d9 - rustc::ty::layout::Layout::compute_uncached::hdd47920a35587b50
12: 0x7f7b9096339f - rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout::h4668b349f32d3f11
13: 0x7f7b909476ff - rustc::ty::layout::Layout::compute_uncached::hdd47920a35587b50
14: 0x7f7b9096339f - rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout::h4668b349f32d3f11
15: 0x7f7b909476ff - rustc::ty::layout::Layout::compute_uncached::hdd47920a35587b50
16: 0x7f7b9096339f - rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout::h4668b349f32d3f11
17: 0x7f7b909476ff - rustc::ty::layout::Layout::compute_uncached::hdd47920a35587b50
18: 0x7f7b9096339f - rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout::h4668b349f32d3f11
19: 0x7f7b909476ff - rustc::ty::layout::Layout::compute_uncached::hdd47920a35587b50
20: 0x7f7b9096339f - rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout::h4668b349f32d3f11
21: 0x7f7b909476ff - rustc::ty::layout::Layout::compute_uncached::hdd47920a35587b50
22: 0x7f7b9213ecec - rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout::h4668b349f32d3f11
23: 0x7f7b921c163f - rustc_trans::context::CrateContext::layout_of::hbaaecdd9b8a912d1
24: 0x7f7b9221dd39 - rustc_trans::type_of::sizing_type_of::h1b47e24af719fcdb
25: 0x7f7b921811de - rustc_trans::abi::FnType::unadjusted::h425ddefde7ae39b2
26: 0x7f7b921d9969 - rustc_trans::declare::declare_fn::h8c909c61873076f4
27: 0x7f7b92216688 - rustc_trans::trans_item::TransItem::predefine::h6a4ae615d063f73e
28: 0x7f7b92195c91 - rustc_trans::base::trans_crate::hf067cf9d0a8bcbf2
29: 0x7f7b93a3ec9d - rustc_driver::driver::phase_4_translate_to_llvm::he9d5d0022988d46e
30: 0x7f7b93a7b28c - rustc_driver::driver::compile_input::{{closure}}::h13e3af2358852a64
31: 0x7f7b93a66525 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h2b062b0c671cd504
32: 0x7f7b93a371b5 - rustc_driver::driver::phase_3_run_analysis_passes::h2f1bd27ff2e4d8a0
33: 0x7f7b93a27fd3 - rustc_driver::driver::compile_input::h7dacd98cd2fd7d2b
34: 0x7f7b93a54766 - rustc_driver::run_compiler::h37c4294ab73436f7
35: 0x7f7b93991ce3 - std::panicking::try::do_call::h4d040997e2efdaf3
36: 0x7f7b9368f8c6 - __rust_maybe_catch_panic
37: 0x7f7b939af879 - <F as alloc::boxed::FnBox<A>>::call_box::hefd1c85fab3e6c31
38: 0x7f7b9367e180 - std::sys::thread::Thread::new::thread_start::h5b631f48cd23f128
39: 0x7f7b8b763463 - start_thread
40: 0x7f7b932c930c - clone
41: 0x0 - <unknown>
error: Could not compile `time_steward`.
Meta
rustc --version --verbose
:
rustc 1.13.0-nightly (923bac4 2016-09-06)
binary: rustc
commit-hash: 923bac4
commit-date: 2016-09-06
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly