Skip to content

Commit 9d05497

Browse files
Rollup merge of rust-lang#140681 - jieyouxu:test_helpers, r=petrochenkov
Don't ignore compiler stderr in `lib-defaults.rs` Closes rust-lang#54222. - Don't ignore compiler stderr. - Document test intent. - Move under `tests/ui/link-native-libs/` instead. This was previously discussed on https://web.archive.org/web/20181028094402/https://botbot.me/mozilla/rust-tools/2017-02-21/?page=1. try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1 try-job: aarch64-apple try-job: x86_64-apple-1
2 parents ebd12fc + cbaa73b commit 9d05497

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)