websockets-rs / websockets-rs/rust-websocket

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

Open
#277 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

[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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/56484
= note: #[allow(order_dependent_trait_objects)] on by default`

What steps should I take next?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dependency chain in hyper 0.10.15's Cargo.toml and inspect traitobject 0.1.0's src/impls.rs at the reported implementations. Run cargo report future-incompatibilities --id 1 --package traitobject@0.1.0 and determine how rust-websocket can address the dependency warning. Done means the websocket client no longer surfaces this future-incompatibility warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.