You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
If we find a blanket impl for `Trait` but we're matching on an object `Trait`, prefer the object (I think we could perhaps go either way, but this seems safer). Also give a nice error for attempts to manually `impl Trait for Trait`, since they will be ineffectual.
This fixes the problems around ambiguity ICEs relating to `Any` and `MarkerTrait` that were cropping up all over the place. There may still be similar ICEs reported in #21756 that this PR does not address.
Fixes#24015.
Fixes#24051.
Fixes#24037.
Fixes#23853.
Fixes#21942.
cc #21756.
cc @alexcrichton (this fixes crates.io)
r? @aturon
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:
Meta
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: