This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ edition: 2021
2+ //@ compile-flags: -Cinstrument-coverage=on
3+
4+ #[ inline]
5+ pub fn inline_me ( ) { }
6+
7+ #[ inline( never) ]
8+ pub fn no_inlining_please ( ) { }
9+
10+ pub fn generic < T > ( ) { }
11+
12+ // FIXME(#132436): Even though this doesn't ICE, it still produces coverage
13+ // reports that undercount the affected code.
Original file line number Diff line number Diff line change 1+ //@ edition: 2021
2+ //@ compile-flags: -Cinstrument-coverage=off
3+ //@ ignore-coverage-run
4+ //@ aux-crate: inline_mixed_helper=inline_mixed_helper.rs
5+
6+ // Regression test for <https://github.com/rust-lang/rust/pull/132395>.
7+ // Various forms of cross-crate inlining can cause coverage statements to be
8+ // inlined into crates that are being built without coverage instrumentation.
9+ // At the very least, we need to not ICE when that happens.
10+
11+ fn main ( ) {
12+ inline_mixed_helper:: inline_me ( ) ;
13+ inline_mixed_helper:: no_inlining_please ( ) ;
14+ inline_mixed_helper:: generic :: < u32 > ( ) ;
15+ }
16+
17+ // FIXME(#132437): We currently don't test this in coverage-run mode, because
18+ // whether or not it produces a `.profraw` file appears to differ between
19+ // platforms.
You can’t perform that action at this time.
0 commit comments