Files
rust/tests/ui/instrument-coverage/msvc-link-dead-code-inline-always-85461.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
602 B
Rust
Raw Permalink Normal View History

2025-07-13 16:56:31 -04:00
// 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
2023-05-17 10:41:41 +02:00
//@ 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();
}
}