Closed
Description
Code:
trait Wrap<'b> {
fn foo(&'b mut self);
}
struct Wrapper<P>(P);
impl<'b, P> Wrap<'b> for Wrapper<P>
where P: Process<'b>,
<P as Process<'b>>::Item: Iterator {
fn foo(&mut self) {}
}
pub trait Process<'a> {
type Item;
fn bar(&'a self);
}
fn push_process<P>(process: P) where P: Process<'static> {
let _: Box<for<'b> Wrap<'b>> = Box::new(Wrapper(process));
}
fn main() {}
Output:
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: leak_check(infcx, &skol_map, snapshot).is_ok()', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc/middle/infer/higher_ranked/mod.rs:561
stack backtrace:
1: 0x10a98b4b5 - sys::backtrace::write::h64ca2fb259c4ae97lCt
2: 0x10a9ad94f - failure::on_fail::h64ff5ae6887860cc0Hz
3: 0x10a9195ca - rt::unwind::begin_unwind_inner::h1d4bc098fd350446Qpz
4: 0x107a5b05c - rt::unwind::begin_unwind::h14752733970416986751
5: 0x107de5abb - middle::traits::select::SelectionContext<'cx, 'tcx>::vtable_impl::hddc0cc735340ecc8snT
6: 0x107df3983 - middle::infer::InferCtxt<'a, 'tcx>::try::h7243598630119042649
7: 0x107de02d7 - middle::traits::select::SelectionContext<'cx, 'tcx>::confirm_candidate::hac288b7baea2474883S
8: 0x107dc1b0d - middle::traits::select::SelectionContext<'cx, 'tcx>::select::h40303230723bb5b2GmR
9: 0x107dbf4a1 - middle::traits::fulfill::FulfillmentContext<'tcx>::select::hd311ca92298c935c5uP
10: 0x107dbe95f - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h0ddf391ab631b9dcbuP
11: 0x107706075 - check::vtable::select_fcx_obligations_where_possible::hadc6eeee207ed13f6lb
12: 0x107705812 - check::vtable::select_all_fcx_obligations_or_error::h185f88f1cc7da26fdkb
13: 0x107789b8a - check::check_bare_fn::h92d153344310f88bH3j
14: 0x1077816f5 - check::check_item::hffd8f154a5736127umk
15: 0x10784906f - check_crate::unboxed_closure.30671
16: 0x107844873 - check_crate::h32fc7f8788be683523x
17: 0x1071b4982 - driver::phase_3_run_analysis_passes::h4c5cf0d8fe5d55degwa
18: 0x10719b420 - driver::compile_input::h31580cbd7ea87613xba
19: 0x107266fda - monitor::unboxed_closure.22557
20: 0x107265735 - thunk::F.Invoke<A, R>::invoke::h6367419564961841226
21: 0x107264510 - rt::unwind::try::try_fn::h7763956589852599824
22: 0x10aa142a9 - rust_try_inner
23: 0x10aa14296 - rust_try
24: 0x107264c0c - thunk::F.Invoke<A, R>::invoke::h16724184168577887652
25: 0x10a99b154 - sys::thread::thread_start::hbd8f2f8bdd3a3baadrw
26: 0x7fff877a32fc - _pthread_body
27: 0x7fff877a3279 - _pthread_body
Rust version:
rustc 1.0.0-nightly (b47aebe3f 2015-02-26) (built 2015-02-26)
binary: rustc
commit-hash: b47aebe3fc2da06c760fd8ea19f84cbc41d34831
commit-date: 2015-02-26
build-date: 2015-02-26
host: x86_64-apple-darwin
release: 1.0.0-nightly