Closed
Description
#![crate_type = "lib"]
#![feature(specialization)]
trait X {}
trait Y : X {}
trait Z { type Assoc : Y; }
struct A < T > (T);
impl < T : X > Z for A < T > { type Assoc = T; }
impl < T > From << A < T > as Z > :: Assoc > for T {}
$ RUST_BACKTRACE=full rustc-nightly tmp.rs
error: internal compiler error: /checkout/src/librustc/traits/specialize/mod.rs:201: failed to fully normalize <T as std::convert::From<<A<T> as Z>::Assoc>>: [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<T as X>)),depth=1),Unimplemented)]
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.21.0-nightly (8c303ed87 2017-08-20) running on i686-unknown-linux-gnu
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:486:8
stack backtrace:
0: 0xf756ae9a - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h80d78ba3b40687b5
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0xf7565c22 - std::sys_common::backtrace::_print::h47b9b32fe06dd6eb
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: 0xf7576c7e - std::panicking::default_hook::{{closure}}::h006dcf643a2d1ee4
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:381
3: 0xf75769ad - std::panicking::default_hook::h1e56c296d63316e2
at /checkout/src/libstd/panicking.rs:391
4: 0xf757719b - std::panicking::rust_panic_with_hook::h218401524ff20a29
at /checkout/src/libstd/panicking.rs:611
5: 0xf5ce3361 - std::panicking::begin_panic::h4938377ed080c909
6: 0xf5d0103f - rustc_errors::Handler::bug::h4d89c75d22c1017a
7: 0xf642e3d9 - rustc::session::opt_span_bug_fmt::{{closure}}::h381ad37ab7e154b0
8: 0xf642e0f6 - rustc::session::opt_span_bug_fmt::h528b45e685201abd
9: 0xf642dddc - rustc::session::bug_fmt::h1dc99310f401e1e0
10: 0xf63b3ddc - rustc::infer::InferCtxtBuilder::enter::{{closure}}::h82e8f134f0254b28
11: 0xf6464abe - rustc::traits::specialize::specializes::h7794bdf6e1e8f332
12: 0xf646233a - rustc::traits::specialize::specialization_graph::Graph::insert::he7ff6d711ea6fcd9
13: 0xf6467d55 - rustc::traits::specialize::specialization_graph_provider::ha5176b7326253e05
14: 0xf6301c7f - rustc::dep_graph::graph::DepGraph::with_task::h0b47e6edc22573aa
15: 0xf6568418 - rustc::ty::maps::<impl rustc::ty::maps::queries::specialization_graph_of<'tcx>>::try_get::h8fd63e3116cfd952
16: 0xf6580786 - rustc::ty::maps::TyCtxtAt::specialization_graph_of::he681c442a59e5f1e
17: 0xf657b36c - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::specialization_graph_of::h548cfa1b93c36d1b
18: 0xf6eb10af - rustc_typeck::coherence::coherent_trait::he9b367dd38388e4d
19: 0xf6304088 - rustc::dep_graph::graph::DepGraph::with_task::h52ef919fdecc85b3
20: 0xf6546422 - rustc::ty::maps::<impl rustc::ty::maps::queries::coherent_trait<'tcx>>::try_get::h2545313871596278
21: 0xf657a28f - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::coherent_trait::haf1a556d9bf16dd4
22: 0xf6ebb412 - rustc_typeck::check_crate::{{closure}}::{{closure}}::h556e9f4e5e30732c
23: 0xf6eb946d - rustc_typeck::check_crate::he7e69726bde9082c
24: 0xf7692706 - rustc::ty::context::TyCtxt::create_and_enter::h54fe8ddc7b2f2638
25: 0xf76f8e43 - rustc_driver::driver::compile_input::h36c200773836acf5
26: 0xf7712575 - rustc_driver::run_compiler::hdf3c0b5b5e4bbadc
27: 0xf7651caf - std::sys_common::backtrace::__rust_begin_short_backtrace::h9143dfc110593bba
28: 0xf75b3f82 - __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
29: 0xf7683ae1 - <F as alloc::boxed::FnBox<A>>::call_box::h7d6c81c9ff90eab5
30: 0xf7575cbb - std::sys::imp::thread::Thread::new::thread_start::h505201887c39140f
at /checkout/src/liballoc/boxed.rs:692
at /checkout/src/libstd/sys_common/thread.rs:21
at /checkout/src/libstd/sys/unix/thread.rs:84
31: 0xf5c65294 - start_thread
32: 0xf73fa05d - __clone
33: 0x0 - <unknown>
rustc 1.21.0-nightly (8c303ed87 2017-08-20)