Skip to content

Regression: conflicting implementations of trait std::convert::Into<std::boxed::Box<_>> for type Bow<'_, _> #46328

Closed
@SimonSapin

Description

@SimonSapin

https://crates.io/crates/bow/1.0.3 contains this impl:

impl<'a, T: 'a + ToBox + ?Sized> Into<boxed::Box<T>> for Bow<'a, T> {
    fn into(self) -> boxed::Box<T> {
        self.into_box()
    }
}

It compiles on nightly-2017-11-27, but fails in nightly-2017-11-28 with:

error[E0119]: conflicting implementations of trait `std::convert::Into<std::boxed::Box<_>>` for type `Bow<'_, _>`:
   --> src/lib.rs:124:1
    |
124 | / impl<'a, T: 'a + ToBox + ?Sized> Into<boxed::Box<T>> for Bow<'a, T> {
125 | |     fn into(self) -> boxed::Box<T> {
126 | |         self.into_box()
127 | |     }
128 | | }
    | |_^
    |
    = note: conflicting implementation in crate `core`:
            - impl<T, U> std::convert::Into<U> for T
              where U: std::convert::From<T>;

Range between the two nighlies: 827cb0d...560a5da

c48650e from #44884 sounds maybe relevant. CC @arielb1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions