9a20cf1697
This reverts commit6d2b84b3ed
, reversing changes made to73bc12199e
.
20 lines
316 B
Rust
20 lines
316 B
Rust
// check-pass
|
|
// compile-flags: -Znext-solver
|
|
#![feature(trait_upcasting)]
|
|
|
|
pub trait A {}
|
|
pub trait B: A {}
|
|
|
|
pub trait Mirror {
|
|
type Assoc: ?Sized;
|
|
}
|
|
impl<T: ?Sized> Mirror for T {
|
|
type Assoc = T;
|
|
}
|
|
|
|
pub fn foo<'a>(x: &'a <dyn B + 'static as Mirror>::Assoc) -> &'a (dyn A + 'static) {
|
|
x
|
|
}
|
|
|
|
fn main() {}
|