rust/src/test/ui/generic/generic-no-mangle.rs
varkor 9cfdb80085 Update tests
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15 22:29:24 +00:00

16 lines
354 B
Rust

#![deny(no_mangle_generic_items)]
#[no_mangle]
pub fn foo<T>() {} //~ ERROR functions generic over types or consts must be mangled
#[no_mangle]
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() {}