]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generics/generic-no-mangle.rs
146896cdc3d024f66fb42f17352800de86a4a897
[rust.git] / src / test / ui / generics / generic-no-mangle.rs
1 // run-rustfix
2
3 #![deny(no_mangle_generic_items)]
4
5 #[no_mangle]
6 pub fn foo<T>() {} //~ ERROR functions generic over types or consts must be mangled
7
8 #[no_mangle]
9 pub extern "C" 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() {}