2023-08-14 18:37:06 -05:00
|
|
|
//@ revisions: current next
|
2024-03-10 20:18:41 -05:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2023-12-14 06:11:28 -06:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
2022-09-14 20:13:46 -05:00
|
|
|
//@ check-pass
|
|
|
|
|
|
|
|
trait Trait {}
|
|
|
|
impl<T> Trait for T {}
|
|
|
|
|
|
|
|
trait Noop {
|
|
|
|
type Assoc: ?Sized;
|
|
|
|
}
|
|
|
|
impl<T: ?Sized> Noop for T {
|
|
|
|
type Assoc = T;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct NoopNewtype<T: ?Sized + Noop>(T::Assoc);
|
|
|
|
fn coerce_newtype<T: Trait>(x: &NoopNewtype<T>) -> &NoopNewtype<dyn Trait + '_> {
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|