diff options
| author | Ralf Jung <post@ralfj.de> | 2025-08-20 08:14:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-20 08:14:57 +0000 |
| commit | 46765526e33dca91b3860715097aa43efe2cf5da (patch) | |
| tree | c790c7a6d94c4d2c96b820cc93804ec55af4bdbe /tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs | |
| parent | 49abb66e5d199497830b88397f2218cbe4b978f1 (diff) | |
| parent | 5556212823c359619302748e9280258c11799db1 (diff) | |
| download | rust-46765526e33dca91b3860715097aa43efe2cf5da.tar.gz rust-46765526e33dca91b3860715097aa43efe2cf5da.zip | |
Merge pull request #4532 from rust-lang/rustup-2025-08-20
Automatic Rustup
Diffstat (limited to 'tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs')
| -rw-r--r-- | tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs b/tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs new file mode 100644 index 00000000000..ffb535e69ee --- /dev/null +++ b/tests/ui/instrument-coverage/link-regex-crate-with-instrument-coverage-85461.rs @@ -0,0 +1,29 @@ +// https://github.com/rust-lang/rust/issues/85461 +//@ compile-flags: -Cinstrument-coverage -Ccodegen-units=4 --crate-type dylib -Copt-level=0 +//@ build-pass +//@ needs-profiler-runtime +//@ needs-dynamic-linking + +// Regression test for #85461 where MSVC sometimes fails to link instrument-coverage binaries +// with dead code and #[inline(always)]. + +#![allow(dead_code)] + +mod foo { + #[inline(always)] + pub fn called() { } + + fn uncalled() { } +} + +pub mod bar { + pub fn call_me() { + super::foo::called(); + } +} + +pub mod baz { + pub fn call_me() { + super::foo::called(); + } +} |
