mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
18 lines
361 B
Rust
18 lines
361 B
Rust
//@ 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() {}
|