File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-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+ LL| |//@ edition: 2021
2+ LL| |//@ compile-flags: -Cinstrument-coverage=on
3+ LL| |
4+ LL| |#[inline]
5+ LL| 0|pub fn inline_me() {}
6+ LL| |
7+ LL| |#[inline(never)]
8+ LL| 1|pub fn no_inlining_please() {}
9+ LL| |
10+ LL| 0|pub fn generic<T>() {}
11+ LL| |
12+ LL| |// FIXME(#132436): Even though this doesn't ICE, it still produces coverage
13+ LL| |// reports that undercount the affected code.
14+
Original file line number Diff line number Diff line change 1+ //@ edition: 2021
2+ //@ compile-flags: -Cinstrument-coverage=off
3+ //@ aux-crate: inline_mixed_helper=inline_mixed_helper.rs
4+
5+ // Regression test for <https://github.com/rust-lang/rust/pull/132395>.
6+ // Various forms of cross-crate inlining can cause coverage statements to be
7+ // inlined into crates that are being built without coverage instrumentation.
8+ // At the very least, we need to not ICE when that happens.
9+
10+ fn main ( ) {
11+ inline_mixed_helper:: inline_me ( ) ;
12+ inline_mixed_helper:: no_inlining_please ( ) ;
13+ inline_mixed_helper:: generic :: < u32 > ( ) ;
14+ }
You can’t perform that action at this time.
0 commit comments