Closed
Description
Trying to compile the code of iron/router with a suggested change to make it build against latest nightly causes an ICE.
I tried this code:
Cloned the iron/router repo and changed this line to extern crate route_recognizer as recognizer;
because the compiler was complaining about "route-recognizer"
.
I expected to see this happen: lib compiling.
Instead, this happened:
Compiling router v0.0.9 (file:///home/mihnea/localCode/rust/router)
src/router.rs:158:1: 158:45 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait `core::marker::MarkerTrait` for the type `iron::middleware::Handler`
src/router.rs:158 impl Key for Router { type Value = Params; }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: 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:130
Meta
rustc --version --verbose
:
rustc 1.0.0-nightly (d17d6e7f1 2015-04-02) (built 2015-04-03)
binary: rustc
commit-hash: d17d6e7f1f05fbdd4d9d246400ffebf768878c7a
commit-date: 2015-04-02
build-date: 2015-04-03
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
Backtrace:
9:25:28 mihnea@Dsktp router master ? RUST_BACKTRACE=1 cargo build 101 ↵
Compiling router v0.0.9 (file:///home/mihnea/localCode/rust/router)
src/router.rs:158:1: 158:45 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait `core::marker::MarkerTrait` for the type `iron::middleware::Handler`
src/router.rs:158 impl Key for Router { type Value = Params; }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: 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:130
stack backtrace:
1: 0x7f44255df3b8 - sys::backtrace::write::he4dda5a986f8dfc9IJC
2: 0x7f442560a760 - panicking::on_panic::h5b2db6d96c6af729sXI
3: 0x7f4425542493 - rt::unwind::begin_unwind_inner::h312dab2a9cc03afbACI
4: 0x7f44228e705d - rt::unwind::begin_unwind::h8552855983279226119
5: 0x7f44228e7003 - diagnostic::SpanHandler::span_bug::h047bbb0d01e0a28bjnB
6: 0x7f44234aecad - middle::traits::error_reporting::report_fulfillment_error::h6f5315d3a072ec31hTN
7: 0x7f442332c781 - middle::traits::error_reporting::report_fulfillment_errors::hd6f038665085589bxSN
8: 0x7f442422566c - check::vtable::select_all_fcx_obligations_or_error::h503b6970fbb9a23eX1b
9: 0x7f44242af449 - check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_item_well_formed::h7fc6515377d7730bmWk
10: 0x7f44242b7d32 - visit::walk_item::h11327894352272839766
11: 0x7f44243b29d9 - check_crate::closure.36300
12: 0x7f44243ace13 - check_crate::ha6e679122aa8dfb5bwC
13: 0x7f4425c5f5cd - driver::phase_3_run_analysis_passes::h001143095bbfc525gGa
14: 0x7f4425c43425 - driver::compile_input::h982ca27ddfea1322Qba
15: 0x7f4425cfa9d5 - run_compiler::h46e3b1adb4d7a56fV4b
16: 0x7f4425cf82ed - boxed::F.FnBox<A>::call_box::h10231365352816203841
17: 0x7f4425cf7829 - rt::unwind::try::try_fn::h6438714248533661505
18: 0x7f4425686c58 - rust_try_inner
19: 0x7f4425686c45 - rust_try
20: 0x7f4425cf7afb - boxed::F.FnBox<A>::call_box::h8924274584753923957
21: 0x7f44255f5771 - sys::thread::create::thread_start::h1fdda6dc8c80280aExH
22: 0x7f441f3c50a4 - start_thread
23: 0x7f44251a5cfc - __clone
24: 0x0 - <unknown>
Could not compile `router`.
To learn more, run the command again with --verbose.