mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 02:40:45 +00:00
22 lines
281 B
Rust
22 lines
281 B
Rust
//@ check-pass
|
|
|
|
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;
|
|
}
|
|
|
|
fn main() {}
|