2023-11-26 21:20:45 -06:00
|
|
|
// revisions: current next
|
2023-12-14 06:11:28 -06:00
|
|
|
//[next] compile-flags: -Znext-solver
|
2023-11-26 21:20:45 -06:00
|
|
|
|
|
|
|
struct MyType;
|
2023-11-28 15:45:37 -06:00
|
|
|
trait MyTrait<S> {}
|
2023-11-26 21:20:45 -06:00
|
|
|
|
|
|
|
trait Mirror {
|
|
|
|
type Assoc;
|
|
|
|
}
|
|
|
|
impl<T> Mirror for T {
|
|
|
|
type Assoc = T;
|
|
|
|
}
|
|
|
|
|
2023-11-28 15:45:37 -06:00
|
|
|
impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
|
2023-11-26 21:20:45 -06:00
|
|
|
//~^ NOTE first implementation here
|
2023-11-28 15:45:37 -06:00
|
|
|
impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
|
|
|
|
//~^ ERROR conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>,
|
|
|
|
//~| NOTE conflicting implementation for `(Box<(MyType,)>,
|
2023-11-26 21:20:45 -06:00
|
|
|
//~| NOTE upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions
|
|
|
|
|
|
|
|
fn main() {}
|