rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.99k stars 12.79k forks source link

rustc panic when compiling rgtk #20555

Closed maurizi closed 9 years ago

maurizi commented 9 years ago

I was trying to build https://github.com/maurizi/rgtk/tree/update-to-latest-master

The backtrace is below:

$ RUST_BACKTRACE=1 cargo build --verbose
       Fresh pkg-config v0.1.3
       Fresh gcc v0.1.3
   Compiling rgtk v0.0.1 (file:///home/mike/projects/rust-stuff/rgtk)
     Running `rustc src/rgtk.rs --crate-name rgtk --crate-type rlib -g -C metadata=cec106287d6301f5 -C extra-filename=-cec106287d6301f5 --out-dir /home/mike/projects/rust-stuff/rgtk/target --emit=dep-info,link -L /home/mike/projects/rust-stuff/rgtk/target -L /home/mike/projects/rust-stuff/rgtk/target/deps -L native=/usr/lib/x86_64-linux-gnu -L native=/home/mike/projects/rust-stuff/rgtk/target/build/rgtk-cec106287d6301f5/out -L /home/mike/projects/rust-stuff/rgtk/target/build/rgtk-cec106287d6301f5/out -l gtk-3 -l gdk-3 -l pangocairo-1.0 -l pango-1.0 -l atk-1.0 -l cairo-gobject -l cairo -l gdk_pixbuf-2.0 -l gio-2.0 -l gobject-2.0 -l glib-2.0 -l rgtk_glue:static -l rgtk_glue:static`
<std macros>:5:11: 5:71 warning: `deriving` is deprecated; use `derive`
<std macros>:5         #[deriving(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:5:11: 5:71 warning: `deriving` is deprecated; use `derive`
<std macros>:5         #[deriving(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cairo/paths.rs:83:1: 107:2 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 238989 }:cairo::paths::PathSegments<'a>.Iterator, substs=Substs[types=[[];[];[]], regions=[['_#0r];[];[]]], nested=[[];[];[]])` did not contain projection for `Obligation(predicate=<cairo::paths::PathSegments<'a> as TraitRef(cairo::paths::PathSegments<'a>, core::iter::Iterator)>::Item,depth=0)`
src/cairo/paths.rs:83 impl<'a> Iterator for PathSegments<'a> {
src/cairo/paths.rs:84     fn next(&mut self) -> Option<PathSegment> {
src/cairo/paths.rs:85         let i = self.i;
src/cairo/paths.rs:86 
src/cairo/paths.rs:87         if i >= self.num_data{
src/cairo/paths.rs:88             return None;
                      ...
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<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:     0x7ffa22e142d0 - sys::backtrace::write::h8532e701ef86014f4it
   2:     0x7ffa22e39b00 - failure::on_fail::h7532e1f79d134d5dzvz
   3:     0x7ffa22d9f1c0 - rt::unwind::begin_unwind_inner::h97b151606151d62deaz
   4:     0x7ffa1dc51c60 - rt::unwind::begin_unwind::h15809447133099964284
   5:     0x7ffa1dc51bf0 - diagnostic::SpanHandler::span_bug::he8142ababcc30c39DFF
   6:     0x7ffa21150e70 - middle::traits::project::project_type::h947eece142ef049d52P
   7:     0x7ffa2114dfd0 - middle::traits::project::opt_normalize_projection_type::hb3defb9cc9365d1e8UP
   8:     0x7ffa2113bba0 - middle::traits::project::normalize_projection_type::hdc293893275ee559JTP
   9:     0x7ffa2114f470 - middle::traits::project::AssociatedTypeNormalizer<'a, 'b, 'tcx>.TypeFolder<'tcx>::fold_ty::h801cbd2cdff2eff1kSP
  10:     0x7ffa2240c2e0 - middle::ty_fold::Rc<T>.TypeFoldable<'tcx>::fold_with::h6325524173844043840
  11:     0x7ffa2240ce90 - middle::ty_fold::VecPerParamSpace<T>.TypeFoldable<'tcx>::fold_with::h13884369302522804796
  12:     0x7ffa22428280 - check::FnCtxt<'a, 'tcx>::instantiate_bounds::hed550a9659b70335Oll
  13:     0x7ffa22440fc0 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_impl::closure.29997
  14:     0x7ffa2243d430 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::hb1283961ed8977b7Gfi
  15:     0x7ffa22443d70 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::h001ababd87597e37soi
  16:     0x7ffa22445bd0 - visit::walk_mod::h4610212675369237127
  17:     0x7ffa22443d70 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::h001ababd87597e37soi
  18:     0x7ffa22445bd0 - visit::walk_mod::h4610212675369237127
  19:     0x7ffa22443d70 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::h001ababd87597e37soi
  20:     0x7ffa22630fe0 - check_crate::unboxed_closure.40162
  21:     0x7ffa2262bc30 - check_crate::h19fb6dea5733566ajsx
  22:     0x7ffa23365640 - driver::phase_3_run_analysis_passes::h46b1604d9f9f5633Tva
  23:     0x7ffa23353ae0 - driver::compile_input::h68b8602933aad8d7wba
  24:     0x7ffa2341eeb0 - thunk::F.Invoke<A, R>::invoke::h18029802347644288836
  25:     0x7ffa2341dc60 - rt::unwind::try::try_fn::h6518866316425934196
  26:     0x7ffa22ea0400 - rust_try_inner
  27:     0x7ffa22ea03f0 - rust_try
  28:     0x7ffa2341dfb0 - thunk::F.Invoke<A, R>::invoke::h15513809553472565307
  29:     0x7ffa22e25e40 - sys::thread::thread_start::h5ea7ba97235331d5a9v
  30:     0x7ffa1d474fe0 - start_thread
  31:     0x7ffa22a46749 - __clone
  32:                0x0 - <unknown>

Could not compile `rgtk`.

Caused by:
  Process didn't exit successfully: `rustc src/rgtk.rs --crate-name rgtk --crate-type rlib -g -C metadata=cec106287d6301f5 -C extra-filename=-cec106287d6301f5 --out-dir /home/mike/projects/rust-stuff/rgtk/target --emit=dep-info,link -L /home/mike/projects/rust-stuff/rgtk/target -L /home/mike/projects/rust-stuff/rgtk/target/deps -L native=/usr/lib/x86_64-linux-gnu -L native=/home/mike/projects/rust-stuff/rgtk/target/build/rgtk-cec106287d6301f5/out -L /home/mike/projects/rust-stuff/rgtk/target/build/rgtk-cec106287d6301f5/out -l gtk-3 -l gdk-3 -l pangocairo-1.0 -l pango-1.0 -l atk-1.0 -l cairo-gobject -l cairo -l gdk_pixbuf-2.0 -l gio-2.0 -l gobject-2.0 -l glib-2.0 -l rgtk_glue:static -l rgtk_glue:static` (status=101)
oakes commented 9 years ago

Possible duplicate of #20347

huonw commented 9 years ago

Looks like a dupe; thanks for filing!

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