rust/src/test/ui/generic/generic-no-mangle.fixed
2020-07-02 15:18:33 +09:00

17 lines
346 B
Rust

// run-rustfix
#![deny(no_mangle_generic_items)]
pub fn foo<T>() {} //~ ERROR functions generic over types or consts must be mangled
pub extern fn bar<T>() {} //~ ERROR functions generic over types or consts must be mangled
#[no_mangle]
pub fn baz(x: &i32) -> &i32 { x }
#[no_mangle]
pub fn qux<'a>(x: &'a i32) -> &i32 { x }
fn main() {}