2024-08-05 13:04:40 -05:00
|
|
|
//@ check-pass
|
2024-08-04 14:25:49 -05:00
|
|
|
|
|
|
|
trait Trait {
|
|
|
|
type Associated;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait for i32 {
|
|
|
|
type Associated = i64;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Generic<T> {}
|
|
|
|
|
|
|
|
type TraitObject = dyn Generic<<i32 as Trait>::Associated>;
|
|
|
|
|
|
|
|
struct Wrap(TraitObject);
|
|
|
|
|
|
|
|
fn cast(x: *mut TraitObject) {
|
|
|
|
x as *mut Wrap;
|
|
|
|
}
|
2024-08-05 13:04:40 -05:00
|
|
|
|
|
|
|
fn main() {}
|