summaryrefslogtreecommitdiffstats
path: root/tests/run-make/coverage/lib/inline_always_with_dead_code.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/coverage/lib/inline_always_with_dead_code.rs')
-rw-r--r--tests/run-make/coverage/lib/inline_always_with_dead_code.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/run-make/coverage/lib/inline_always_with_dead_code.rs b/tests/run-make/coverage/lib/inline_always_with_dead_code.rs
new file mode 100644
index 000000000..2b21dee6c
--- /dev/null
+++ b/tests/run-make/coverage/lib/inline_always_with_dead_code.rs
@@ -0,0 +1,22 @@
+// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 -Copt-level=0
+
+#![allow(dead_code)]
+
+mod foo {
+ #[inline(always)]
+ pub fn called() { }
+
+ fn uncalled() { }
+}
+
+pub mod bar {
+ pub fn call_me() {
+ super::foo::called();
+ }
+}
+
+pub mod baz {
+ pub fn call_me() {
+ super::foo::called();
+ }
+}