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