2020-07-02 00:32:12 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![deny(no_mangle_generic_items)]
|
|
|
|
|
|
|
|
|
|
|
|
pub fn foo<T>() {} //~ ERROR functions generic over types or consts must be mangled
|
|
|
|
|
|
|
|
|
2020-09-01 16:28:11 -05:00
|
|
|
pub extern "C" fn bar<T>() {} //~ ERROR functions generic over types or consts must be mangled
|
2020-07-02 00:32:12 -05:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn baz(x: &i32) -> &i32 { x }
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn qux<'a>(x: &'a i32) -> &i32 { x }
|
|
|
|
|
|
|
|
fn main() {}
|