2024-02-16 14:02:50 -06:00
|
|
|
//@ revisions: current next
|
2024-03-10 20:18:41 -05:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2024-02-16 14:02:50 -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() {}
|