]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic/generic-no-mangle.rs
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.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() {}