diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-02-17 04:31:46 +0100 |
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2025-03-26 21:59:00 +0100 |
| commit | d1cd621b55a7def094f5cfecb99d2909b2d0e701 (patch) | |
| tree | 972a0174a1496629b43aa7c6b769d567f925109d /tests/ui/codegen/empty-static-libs-issue-108825.rs | |
| parent | 65899c06f117ddac9c8399479ddcdc122c92fddf (diff) | |
| download | rust-d1cd621b55a7def094f5cfecb99d2909b2d0e701.tar.gz rust-d1cd621b55a7def094f5cfecb99d2909b2d0e701.zip | |
Always emit native-static-libs note, even if it is empty
Diffstat (limited to 'tests/ui/codegen/empty-static-libs-issue-108825.rs')
| -rw-r--r-- | tests/ui/codegen/empty-static-libs-issue-108825.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/codegen/empty-static-libs-issue-108825.rs b/tests/ui/codegen/empty-static-libs-issue-108825.rs new file mode 100644 index 00000000000..46bd6d6b2da --- /dev/null +++ b/tests/ui/codegen/empty-static-libs-issue-108825.rs @@ -0,0 +1,16 @@ +//! Test that linking a no_std application still outputs the +//! `native-static-libs: ` note, even though it is empty. + +//@ compile-flags: -Cpanic=abort --print=native-static-libs +//@ build-pass +//@ error-pattern: note: native-static-libs: +//@ dont-check-compiler-stderr (libcore links `/defaultlib:msvcrt` or `/defaultlib:libcmt` on MSVC) +//@ ignore-pass (the note is emitted later in the compilation pipeline, needs build) + +#![crate_type = "staticlib"] +#![no_std] + +#[panic_handler] +fn panic(_info: &core::panic::PanicInfo) -> ! { + loop {} +} |
