fix(rustup): rustc 1.0.0-nightly (ea8b82e90)

This commit fixes `cargo build` and `cargo test`.

Method lookup on traits seems to have changed to force
`impl TraitName` expressions to be more specific. That means that
`method` will not be found anymore on an object of type `&Trait+Send`,
unless you provide an `impl Trait+Send`.

Now `NetworkStream` and `HeaderFormat` trait implementations
are done against `* + Send`, which helps the compiler to find the
respective `downcast*` method implementations once again.
This commit is contained in:
Sebastian Thiel
2015-03-20 10:28:35 +01:00
parent 1f0bc951c9
commit 8181de253a
2 changed files with 7 additions and 7 deletions

View File

@@ -75,7 +75,7 @@ impl<T: HeaderFormat + Send + Sync + Clone> HeaderClone for T {
}
}
impl HeaderFormat {
impl HeaderFormat + Send + Sync {
#[inline]
unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
mem::transmute(mem::transmute::<&HeaderFormat, raw::TraitObject>(self).data)