Skip to content

Warning: Contains Code That Will Become an Error in a Future Release of Rust #277

Open
@DanteVillarreal

Description

@DanteVillarreal

[hyper 0.10.15] (https://github.com/hyperium/hyper/blob/0.10.x/Cargo.toml), which depends on traitobject 0.1.0 "contains code that will become an error in future versions of rust."

I was making a websocket client in your awesome crate, and after many days of working at it, I finally got it to work. Thank God. However, upon further inspection, I got a warning. To my surprise, it wasn't in my own code. It was from one of the packages that this crate relies on:

Here is the long version of the warnings I got:

The package traitobject v0.1.0` currently triggers the following future incompatibility lints:

warning: conflicting implementations of trait Trait for type (dyn Send + Sync + 'static): (E0119)
--> C:\Users\djv60.cargo\registry\src\index.crates.io-6f17d22bba15001f\traitobject-0.1.0\src\impls.rs:72:1
|
71 | unsafe impl Trait for ::std::marker::Send + Sync { }
| ------------------------------------------------ first implementation here
72 | unsafe impl Trait for ::std::marker::Send + Send + Sync { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for (dyn Send + Sync + 'static)
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #56484 rust-lang/rust#56484
= note: #[allow(order_dependent_trait_objects)] on by default

warning: conflicting implementations of trait Trait for type (dyn Send + Sync + 'static): (E0119)
--> C:\Users\djv60.cargo\registry\src\index.crates.io-6f17d22bba15001f\traitobject-0.1.0\src\impls.rs:73:1
|
72 | unsafe impl Trait for ::std::marker::Send + Send + Sync { }
| ------------------------------------------------------- first implementation here
73 | unsafe impl Trait for ::std::marker::Sync + Send { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for (dyn Send + Sync + 'static)
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #56484 rust-lang/rust#56484
= note: #[allow(order_dependent_trait_objects)] on by default

warning: conflicting implementations of trait Trait for type (dyn Send + Sync + 'static): (E0119)
--> C:\Users\djv60.cargo\registry\src\index.crates.io-6f17d22bba15001f\traitobject-0.1.0\src\impls.rs:75:1
|
73 | unsafe impl Trait for ::std::marker::Sync + Send { }
| ------------------------------------------------ first implementation here
74 | unsafe impl Trait for ::std::marker::Sync + Sync { }
75 | unsafe impl Trait for ::std::marker::Sync + Send + Sync { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for (dyn Send + Sync + 'static)
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #56484 rust-lang/rust#56484
= note: #[allow(order_dependent_trait_objects)] on by default`

What steps should I take next?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions