rust/tests
bors b5cdb9631f Auto merge of #117827 - Zalathar:bogus-macro-name-span, r=davidtwco
coverage: Avoid creating malformed macro name spans

This is a workaround for #117788. It detects a particular scenario where we would create malformed coverage spans that might cause `llvm-cov` to immediately exit with an error, preventing the user from processing coverage reports.

The patch has been kept as simple as possible so that it's trivial to backport to beta (or stable) if desired.

---

The `maybe_push_macro_name_span` method is trying to detect macro invocations, so that it can split a span into two parts just after the `!` of the invocation.

Under some circumstances (probably involving nested macros), it gets confused and produces a span that is larger than the original span, and possibly extends outside its enclosing function and even into an adjacent file.

In extreme cases, that can result in malformed coverage mappings that cause `llvm-cov` to fail. For now, we at least want to detect these egregious cases and avoid them, so that coverage reports can still be produced.
2023-11-13 06:16:27 +00:00
..
assembly Fix closure-inherit-target-feature test for SGX platform 2023-10-23 14:39:01 +02:00
auxiliary
codegen Emit #[inline] on derive(Debug) 2023-11-09 10:40:55 -05:00
codegen-units Automatically enable cross-crate inlining for small functions 2023-10-17 19:53:51 -04:00
coverage coverage: Regression test for #117788 2023-11-13 12:31:44 +11:00
coverage-run-rustdoc coverage: Rename the `run-coverage` test mode to `coverage-run` 2023-11-08 16:41:24 +11:00
debuginfo Check alignment of pointers only when read/written through 2023-11-04 13:01:32 -04:00
incremental Bless incremental tests. 2023-10-06 15:46:11 +00:00
mir-opt update mir-opt tests 2023-11-08 22:55:29 +01:00
pretty Remove unnecessary CVarArgs name skipping logic 2023-10-25 17:44:17 +02:00
run-make Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
run-make-fulldeps Minimize `pub` usage in `source_map.rs`. 2023-11-02 19:35:00 +11:00
run-pass-valgrind
rustdoc Rollup merge of #117531 - fmease:rustdoc-effects-properly-elide-x-crate-host-args, r=GuillaumeGomez 2023-11-08 11:25:54 +01:00
rustdoc-gui Add GUI test to ensure that implementations on foreign types are in the expected order 2023-11-02 18:02:14 +01:00
rustdoc-js Add regression test for #115480 2023-10-11 11:41:39 +02:00
rustdoc-js-std rustdoc: update test cases for changes to the printing style 2023-09-21 15:16:44 -07:00
rustdoc-json rustdoc-json: Fix test so it actuall checks things 2023-11-09 12:13:16 +00:00
rustdoc-ui Mark Rustdoc test as Linux-only 2023-11-08 08:53:58 -05:00
ui Auto merge of #117770 - sjwang05:issue-117766, r=estebank,TaKO8Ki 2023-11-13 01:57:59 +00:00
ui-fulldeps add `fn visit_capture_by` to MutVisitor and fix pprust-expr-roundtrip.rs 2023-11-04 21:04:54 +01:00
COMPILER_TESTS.md