]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic/generic-no-mangle.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / ui / generic / generic-no-mangle.rs
1 #![deny(no_mangle_generic_items)]
2
3 #[no_mangle]
4 pub fn foo<T>() {} //~ ERROR functions generic over types or consts must be mangled
5
6 #[no_mangle]
7 pub extern fn bar<T>() {} //~ ERROR functions generic over types or consts must be mangled
8
9 #[no_mangle]
10 pub fn baz(x: &i32) -> &i32 { x }
11
12 #[no_mangle]
13 pub fn qux<'a>(x: &'a i32) -> &i32 { x }
14
15 fn main() {}