9a20cf1697
This reverts commit6d2b84b3ed
, reversing changes made to73bc12199e
.
23 lines
364 B
Rust
23 lines
364 B
Rust
// compile-flags: -Znext-solver
|
|
// check-pass
|
|
#![feature(trait_upcasting)]
|
|
|
|
trait A {}
|
|
trait B: A {}
|
|
|
|
impl A for usize {}
|
|
impl B for usize {}
|
|
|
|
trait Mirror {
|
|
type Assoc: ?Sized;
|
|
}
|
|
|
|
impl<T: ?Sized> Mirror for T {
|
|
type Assoc = T;
|
|
}
|
|
|
|
fn main() {
|
|
let x = Box::new(1usize) as Box<<dyn B as Mirror>::Assoc>;
|
|
let y = x as Box<<dyn A as Mirror>::Assoc>;
|
|
}
|