]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18804/main.rs
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[rust.git] / src / test / ui / issues / issue-18804 / main.rs
1 // run-pass
2 // Test for issue #18804, #[linkage] does not propagate through generic
3 // functions. Failure results in a linker error.
4
5 // ignore-asmjs no weak symbol support
6 // ignore-emscripten no weak symbol support
7 // ignore-windows no extern_weak linkage
8 // ignore-macos no extern_weak linkage
9
10 // aux-build:lib.rs
11
12 // rust-lang/rust#56772: nikic says we need this to be proper test.
13 // compile-flags: -C no-prepopulate-passes -C passes=name-anon-globals
14
15 extern crate lib;
16
17 fn main() {
18     lib::foo::<i32>();
19 }