]> git.lizzy.rs Git - rust.git/blob - src/test/ui/extern/extern-with-type-bounds.rs
Auto merge of #93718 - thomcc:used-macho, r=pnkfelix
[rust.git] / src / test / ui / extern / extern-with-type-bounds.rs
1 #![feature(intrinsics)]
2
3 extern "rust-intrinsic" {
4     // Real example from libcore
5     fn type_id<T: ?Sized + 'static>() -> u64;
6
7     // Silent bounds made explicit to make sure they are actually
8     // resolved.
9     fn transmute<T: Sized, U: Sized>(val: T) -> U;
10
11     // Bounds aren't checked right now, so this should work
12     // even though it's incorrect.
13     fn size_of<T: Clone>() -> usize;
14
15     // Unresolved bounds should still error.
16     fn align_of<T: NoSuchTrait>() -> usize;
17     //~^ ERROR cannot find trait `NoSuchTrait` in this scope
18 }
19
20 fn main() {}