Skip to content

Commit cbaa73b

Browse files
committed
tests: don't ignore compiler stderr in lib-defaults.rs
And also: - Document test intent. - Move under `link-native-libs/` instead.
1 parent 243c5a3 commit cbaa73b

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

tests/ui/abi/lib-defaults.rs

-15
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//! By default, `-l NAME` without an explicit kind will default to dylib. However, if there's also
2+
//! an `#[link(name = NAME, kind = KIND)]` attribute with an explicit `KIND`, it should override the
3+
//! CLI flag. In particular, this should not result in any duplicate flag warnings from the linker.
4+
5+
//@ run-pass
6+
//@ compile-flags: -lrust_test_helpers
7+
8+
#[link(name = "rust_test_helpers", kind = "static")]
9+
extern "C" {
10+
pub fn rust_dbg_extern_identity_u32(x: u32) -> u32;
11+
}
12+
13+
fn main() {
14+
unsafe {
15+
rust_dbg_extern_identity_u32(42);
16+
}
17+
}

0 commit comments

Comments
 (0)