Closed
Description
The following causes an ICE:
trait Trait1<'l0, T0> {}
trait Trait0<'l0> {}
impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
fn main() {}
Backtrace:
crash.rs:4:1: 4:89 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait `Trait0<'_>` for the type `T0`
crash.rs:4 impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
stack backtrace:
1: 0x10e27099f - sys::backtrace::write::h65efba87d2ac2b9cGGC
2: 0x10e297ae2 - panicking::on_panic::h7344421187b575a3mGI
3: 0x10e1ce9f5 - rt::unwind::begin_unwind_inner::h0fb3967931f800c95nI
4: 0x10d9ac11e - rt::unwind::begin_unwind::h14950887375606487128
5: 0x10d9ac0aa - diagnostic::SpanHandler::span_bug::hce9df0bd0b4a6d6bsmB
6: 0x10b3ae93e - middle::traits::error_reporting::report_fulfillment_errors::h914196447e3f8e39tRN
7: 0x10aa7f283 - check::vtable::select_all_fcx_obligations_or_error::heb0bf2b308159b20P1b
8: 0x10aaf585d - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_item_well_formed::h8592f75fbcdfabe4kWk
9: 0x10abe603e - check_crate::closure.38354
10: 0x10abe1517 - check_crate::hc0c9219806b9606cnuC
11: 0x10a934a62 - driver::phase_3_run_analysis_passes::h22c1ac11f5719067nGa
12: 0x10a91677c - driver::compile_input::ha52ae5794027c2d3Qba
13: 0x10a9dc873 - run_compiler::h88dac0540af48212F4b
14: 0x10a9da39a - boxed::F.FnBox<A>::call_box::h782914981501029945
15: 0x10a9d9837 - rt::unwind::try::try_fn::h11237440895302402829
16: 0x10e31fa48 - rust_try_inner
17: 0x10e31fa35 - rust_try
18: 0x10a9d9b10 - boxed::F.FnBox<A>::call_box::h3896333940280334120
19: 0x10e283e9d - sys::thread::create::thread_start::hb17c0976197a6554xnH
20: 0x7fff8df11741 - _pthread_start
With:
% rustc --version
rustc 1.0.0-nightly (e6a812402 2015-04-14) (built 2015-04-13)
I can confirm that this bug has been around since 1.0.0-alpha (though with a slightly different assertion violation; I accidentally posted that version originally).