blob: ae5a6a5243c8633ea318349689d508c1e80cb2a2 [file] [log] [blame]
//@ check-pass
// issue: 114113
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
#![feature(trait_upcasting)]
trait Mirror {
type Assoc;
}
impl<T> Mirror for T {
type Assoc = T;
}
trait Bar<T> {}
trait Foo<T>: Bar<<T as Mirror>::Assoc> {}
fn upcast<T>(x: &dyn Foo<T>) -> &dyn Bar<T> { x }
fn main() {}