mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-18 10:38:11 +00:00
19 lines
306 B
Rust
19 lines
306 B
Rust
![]() |
// check-pass
|
||
|
// issue: 114113
|
||
|
// revisions: current next
|
||
|
//[next] compile-flags: -Ztrait-solver=next
|
||
|
|
||
|
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() {}
|