Skip to content
This repository was archived by the owner on Nov 5, 2018. It is now read-only.

cargo build fails in Rust Nightly 1.24.0 (2017-11-27) #52

Closed
jeehoonkang opened this issue Nov 28, 2017 · 2 comments
Closed

cargo build fails in Rust Nightly 1.24.0 (2017-11-27) #52

jeehoonkang opened this issue Nov 28, 2017 · 2 comments

Comments

@jeehoonkang
Copy link
Contributor

$ rustc --version
rustc 1.24.0-nightly (560a5da9f 2017-11-27)

$ cargo build
   Compiling crossbeam-epoch v0.1.0 (file:///Users/jeehoon.kang/Works/crossbeam-epoch)
error[E0119]: conflicting implementations of trait `core::convert::Into<std::boxed::Box<_>>` for type `atomic::Owned<_>`:
   --> src/atomic.rs:732:1
    |
732 | / impl<T> Into<Box<T>> for Owned<T> {
733 | |     /// Converts the owned pointer into a `Box`.
734 | |     ///
735 | |     /// # Examples
...   |
748 | |     }
749 | | }
    | |_^
    |
    = note: conflicting implementation in crate `core`:
            - impl<T, U> core::convert::Into<U> for T
              where U: core::convert::From<T>;

error: aborting due to previous error

error: Could not compile `crossbeam-epoch`.

To learn more, run the command again with --verbose.
@ghost
Copy link

ghost commented Nov 28, 2017

Looks like rust-lang/rust#46328

@ghost
Copy link

ghost commented Nov 28, 2017

Unfortunately, this error will persist. See this comment for an explanation.

Let's bring back the explicit into_box method which we used to have a few weeks ago.

By the way, if you're worried that into_box might be unidiomatic, note that there are already several similar methods in the standard library:
https://doc.rust-lang.org/alloc/raw_vec/struct.RawVec.html#method.into_box
https://doc.rust-lang.org/collections/vec/struct.Vec.html#method.into_boxed_slice
https://doc.rust-lang.org/std/string/struct.String.html#method.into_boxed_str

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant