]> git.proxmox.com Git - rustc.git/blob - tests/ui/issues/issue-18804/main.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }