From 341d65d975453af9e548f1f668256604dc1f156a Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Mon, 20 Dec 2021 16:36:38 -0500 Subject: [PATCH] Add test case for #86177 and #85718 --- .../coverage-reports/expected_show_coverage.unused_mod.txt | 7 +++++++ .../run-make-fulldeps/coverage/lib/unused_mod_helper.rs | 3 +++ src/test/run-make-fulldeps/coverage/unused_mod.rs | 6 ++++++ 3 files changed, 16 insertions(+) create mode 100644 src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.unused_mod.txt create mode 100644 src/test/run-make-fulldeps/coverage/lib/unused_mod_helper.rs create mode 100644 src/test/run-make-fulldeps/coverage/unused_mod.rs diff --git a/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.unused_mod.txt b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.unused_mod.txt new file mode 100644 index 0000000000000..0ee80350e1134 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.unused_mod.txt @@ -0,0 +1,7 @@ + 1| |#[path = "lib/unused_mod_helper.rs"] + 2| |mod unused_module; + 3| | + 4| 1|fn main() { + 5| 1| println!("hello world!"); + 6| 1|} + diff --git a/src/test/run-make-fulldeps/coverage/lib/unused_mod_helper.rs b/src/test/run-make-fulldeps/coverage/lib/unused_mod_helper.rs new file mode 100644 index 0000000000000..ae1cc1531ed75 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage/lib/unused_mod_helper.rs @@ -0,0 +1,3 @@ +pub fn never_called_function() { + println!("I am never called"); +} diff --git a/src/test/run-make-fulldeps/coverage/unused_mod.rs b/src/test/run-make-fulldeps/coverage/unused_mod.rs new file mode 100644 index 0000000000000..679b4e5318803 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage/unused_mod.rs @@ -0,0 +1,6 @@ +#[path = "lib/unused_mod_helper.rs"] +mod unused_module; + +fn main() { + println!("hello world!"); +}