1 #![feature(intrinsics)]
3 extern "rust-intrinsic" {
4 // Real example from libcore
5 #[rustc_safe_intrinsic]
6 fn type_id<T: ?Sized + 'static>() -> u64;
8 // Silent bounds made explicit to make sure they are actually
10 fn transmute<T: Sized, U: Sized>(val: T) -> U;
12 // Bounds aren't checked right now, so this should work
13 // even though it's incorrect.
14 #[rustc_safe_intrinsic]
15 fn size_of<T: Clone>() -> usize;
17 // Unresolved bounds should still error.
18 fn align_of<T: NoSuchTrait>() -> usize;
19 //~^ ERROR cannot find trait `NoSuchTrait` in this scope