]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/symbol-visibility/a_rust_dylib.rs
Rollup merge of #99738 - notriddle:notriddle/multiple-modules-w-same-name, r=camelid
[rust.git] / src / test / run-make-fulldeps / symbol-visibility / a_rust_dylib.rs
1 #![crate_type="dylib"]
2
3 extern crate an_rlib;
4
5 // This should be exported
6 pub fn public_rust_function_from_rust_dylib() {}
7
8 // This should be exported
9 #[no_mangle]
10 pub extern "C" fn public_c_function_from_rust_dylib() {
11     let _ = public_generic_function_from_rust_dylib(1u16);
12 }
13
14 // This should be exported if -Zshare-generics=yes
15 pub fn public_generic_function_from_rust_dylib<T>(x: T) -> T { x }