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