about summary refs log tree commit diff
path: root/tests/coverage/auxiliary
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-11-13 11:33:44 +1100
committerZalathar <Zalathar@users.noreply.github.com>2023-11-13 12:31:44 +1100
commit514e324c32db0790a13f52a96e230663f3fe0525 (patch)
tree6c3bc50bd8e32489eff6439bbc02c23440887e69 /tests/coverage/auxiliary
parented8298b825b8c2c5b57471cdd13dec9f94e26c03 (diff)
downloadrust-514e324c32db0790a13f52a96e230663f3fe0525.tar.gz
rust-514e324c32db0790a13f52a96e230663f3fe0525.zip
coverage: Regression test for #117788
Without the workaround applied, this test will produce malformed mappings that
cause `llvm-cov` to fail.

(And if it does emit well-formed mappings, they should be obviously incorrect.)
Diffstat (limited to 'tests/coverage/auxiliary')
-rw-r--r--tests/coverage/auxiliary/macro_name_span_helper.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/coverage/auxiliary/macro_name_span_helper.rs b/tests/coverage/auxiliary/macro_name_span_helper.rs
new file mode 100644
index 00000000000..6797c081d93
--- /dev/null
+++ b/tests/coverage/auxiliary/macro_name_span_helper.rs
@@ -0,0 +1,10 @@
+// edition: 2021
+
+#[macro_export]
+macro_rules! macro_that_defines_a_function {
+    (fn $name:ident () $body:tt) => {
+        fn $name () -> () $body
+    }
+}
+
+// Non-executable comment.