]> git.lizzy.rs Git - rust.git/blob - tests/ui/cast/cast-pointee-projection.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / cast / cast-pointee-projection.rs
1 // check-pass
2
3 trait Tag<'a> {
4     type Type: ?Sized;
5 }
6
7 trait IntoRaw: for<'a> Tag<'a> {
8     fn into_raw(this: *const <Self as Tag<'_>>::Type) -> *mut <Self as Tag<'_>>::Type;
9 }
10
11 impl<T: for<'a> Tag<'a>> IntoRaw for T {
12     fn into_raw(this: *const <Self as Tag<'_>>::Type) -> *mut <Self as Tag<'_>>::Type {
13         this as *mut T::Type
14     }
15 }
16
17 fn main() {}