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: impl VtableImpl(..) did not contain projection for Obligation(..) #20628

Closed
diwic opened this issue Jan 6, 2015 · 1 comment
Closed

Comments

@diwic
Copy link
Contributor

diwic commented Jan 6, 2015

420:2 error: internal compiler error: impl VtableImpl(impl_def_id=DefId { krate: 0, node: 12304 }:ConnectionItems<'a>.Iterator, substs=Substs[types=[[];[];[]], regions=[['_#0r];[];[]]], nested=[[];[];[]]) did not contain projection for Obligation(predicate=<ConnectionItems<'a> as TraitRef(ConnectionItems<'a>, core::iter::Iterator)>::Item,depth=0)

                                 ...

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 'Box', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
1: 0x7fa6520d0920 - sys::backtrace::write::h36422e877a8b3158yQs
2: 0x7fa6520f6650 - failure::on_fail::hde5005d61795902da3y
3: 0x7fa65205c4a0 - rt::unwind::begin_unwind_inner::ha0668a3a9d73b9a7RHy
4: 0x7fa64cf12af0 - rt::unwind::begin_unwind::h9147230717703493418
5: 0x7fa64cf12a80 - diagnostic::SpanHandler::span_bug::hee7de6e88971705bDFF
6: 0x7fa65040dc70 - middle::traits::project::project_type::ha3169b6d00cba236CYP
7: 0x7fa65040add0 - middle::traits::project::opt_normalize_projection_type::h52e80e1c888609adFQP
8: 0x7fa6503f8890 - middle::traits::project::normalize_projection_type::had1d9d27edaeb68fgPP
9: 0x7fa65040c270 - middle::traits::project::AssociatedTypeNormalizer<'a, 'b, 'tcx>.TypeFolder<'tcx>::fold_ty::h8977cf1010cf2ef8RNP
10: 0x7fa6516c9990 - middle::ty_fold::TypeFolder::fold_trait_ref::h15244371943192340039
11: 0x7fa6516ca5c0 - middle::ty_fold::VecPerParamSpace.TypeFoldable<'tcx>::fold_with::h3029018912722243389
12: 0x7fa6516e5b40 - check::FnCtxt<'a, 'tcx>::instantiate_bounds::haf69ce16fdf22227Nul
13: 0x7fa6516fe870 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_impl::closure.30018
14: 0x7fa6516face0 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::h0df2a1129da2a633Hfi
15: 0x7fa651701760 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::hc72c9294b1b3f21ftoi
16: 0x7fa6518efbd0 - check_crate::unboxed_closure.40283
17: 0x7fa6518ea820 - check_crate::h4ba306a17295b431iux
18: 0x7fa652611600 - driver::phase_3_run_analysis_passes::h56810662503f92d8Sva
19: 0x7fa6525ffaa0 - driver::compile_input::h8d0abf631800220evba
20: 0x7fa6526cb070 - thunk::F.Invoke<A, R>::invoke::h13263903969514368718
21: 0x7fa6526c9e20 - rt::unwind::try::try_fn::h2272437873322108176
22: 0x7fa65215a8b0 - rust_try_inner
23: 0x7fa65215a8a0 - rust_try
24: 0x7fa6526ca170 - thunk::F.Invoke<A, R>::invoke::h17236552692728063371
25: 0x7fa6520e2490 - sys::thread::thread_start::hd19c7749b7af23e8EGv
26: 0x7fa64c7360c0 - start_thread
27: 0x7fa651d06ec9 - __clone
28: 0x0 -

I'm trying to make dbus-rs track master, and apparently Iterators have changed in some way that makes compilation fail. Here's the function that fails:

impl<'a> Iterator for ConnectionItems<'a> {
    fn next(&mut self) -> Option<ConnectionItem> {
        loop {
            let i = self.c.i.pending_items.borrow_mut().pop_front();
            if i.is_some() { return i; }

            let r = unsafe { ffi::dbus_connection_read_write_dispatch(self.c.conn(), self.timeout_ms as libc::c_int) };
            if !self.c.i.pending_items.borrow().is_empty() { continue };

            if r == 0 { return None; }
            return Some(ConnectionItem::Nothing);
        }
    }
}
@huonw
Copy link
Member

huonw commented Jan 6, 2015

Closing as a dupe of #20347; thanks for filing!

In this case the fix is writing type Item = ConnectionItem; in the body of the impl.

@huonw huonw closed this as completed Jan 6, 2015
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