summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cast/cast-pointee-projection.rs
blob: f51c5f20f167c5e53959cca3bd3bdbc1db581820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// check-pass

trait Tag<'a> {
    type Type: ?Sized;
}

trait IntoRaw: for<'a> Tag<'a> {
    fn into_raw(this: *const <Self as Tag<'_>>::Type) -> *mut <Self as Tag<'_>>::Type;
}

impl<T: for<'a> Tag<'a>> IntoRaw for T {
    fn into_raw(this: *const <Self as Tag<'_>>::Type) -> *mut <Self as Tag<'_>>::Type {
        this as *mut T::Type
    }
}

fn main() {}