summaryrefslogtreecommitdiffstats
path: root/tests/ui/layout/thin-meta-implies-thin-ptr.rs
blob: 972579ea8be0d7dba6ef17e0fe2f4a96ac7f70e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
// check-pass

#![feature(ptr_metadata)]

use std::ptr::Thin;

fn main() {}

fn foo<T: ?Sized + Thin>(t: *const T) -> *const () {
    unsafe { std::mem::transmute(t) }
}