diff options
| author | bors <bors@rust-lang.org> | 2024-11-03 13:46:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-03 13:46:47 +0000 |
| commit | 7028d9318fadc20e5e3058d52e44d785d31a6aaa (patch) | |
| tree | 8d686b8ea589aca659c750e8ff8a5f9f7127d561 /tests/coverage/inline_mixed.rs | |
| parent | 59ae5eba7e74d2cc7d8d611662e8b3a642d7093a (diff) | |
| parent | 1ba782ab3d1ee6deed44ae9c005632cd1b3673ea (diff) | |
| download | rust-7028d9318fadc20e5e3058d52e44d785d31a6aaa.tar.gz rust-7028d9318fadc20e5e3058d52e44d785d31a6aaa.zip | |
Auto merge of #132555 - matthiaskrgr:rollup-2d79661, r=matthiaskrgr
Rollup of 15 pull requests
Successful merges:
- #129329 (Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`)
- #131377 (Add LowerExp and UpperExp implementations to NonZero)
- #132393 (Docs: added brief colon explanation)
- #132437 (coverage: Regression test for inlining into an uninstrumented crate)
- #132499 (unicode_data.rs: show command for generating file)
- #132503 (better test for const HashMap; remove const_hash leftovers)
- #132511 (stabilize const_arguments_as_str)
- #132520 (NFC add known bug nr to test)
- #132522 (make codegen help output more consistent)
- #132523 (Added regression test for generics index out of bounds)
- #132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion)
- #132537 (PassWrapper: adapt for llvm/llvm-project@5445edb5d)
- #132540 (Do not format generic consts)
- #132543 (add and update some crashtests)
- #132550 (compiler: Continue introducing rustc_abi to the compiler)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/coverage/inline_mixed.rs')
| -rw-r--r-- | tests/coverage/inline_mixed.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/coverage/inline_mixed.rs b/tests/coverage/inline_mixed.rs new file mode 100644 index 00000000000..163cc7d7d6c --- /dev/null +++ b/tests/coverage/inline_mixed.rs @@ -0,0 +1,19 @@ +//@ edition: 2021 +//@ compile-flags: -Cinstrument-coverage=off +//@ ignore-coverage-run +//@ aux-crate: inline_mixed_helper=inline_mixed_helper.rs + +// Regression test for <https://github.com/rust-lang/rust/pull/132395>. +// Various forms of cross-crate inlining can cause coverage statements to be +// inlined into crates that are being built without coverage instrumentation. +// At the very least, we need to not ICE when that happens. + +fn main() { + inline_mixed_helper::inline_me(); + inline_mixed_helper::no_inlining_please(); + inline_mixed_helper::generic::<u32>(); +} + +// FIXME(#132437): We currently don't test this in coverage-run mode, because +// whether or not it produces a `.profraw` file appears to differ between +// platforms. |
