about summary refs log tree commit diff
path: root/tests/ui/cast/dyn-tails-need-normalization.rs
blob: 719e0e892430df925494b702c81f37574d6daf7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ 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() {}