about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-03-14 16:51:33 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-05 15:40:11 +0000
commit50b07aa89970369d2a25203b9426a47a9fec5fb4 (patch)
treea1a9e244e2c352409ed704c3c3fe0d70e0811047 /tests/codegen
parentdb8aca48129d86b2623e3ac8cbcf2902d4d313ad (diff)
downloadrust-50b07aa89970369d2a25203b9426a47a9fec5fb4.tar.gz
rust-50b07aa89970369d2a25203b9426a47a9fec5fb4.zip
add reachability test for const bodies
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/dont_codegen_private_const_fn_only_used_in_const_eval.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/codegen/dont_codegen_private_const_fn_only_used_in_const_eval.rs b/tests/codegen/dont_codegen_private_const_fn_only_used_in_const_eval.rs
index eeeaebe52dd..98ccf93fb5e 100644
--- a/tests/codegen/dont_codegen_private_const_fn_only_used_in_const_eval.rs
+++ b/tests/codegen/dont_codegen_private_const_fn_only_used_in_const_eval.rs
@@ -8,3 +8,9 @@ const fn foo() {}
 pub static FOO: () = foo();
 
 // CHECK-NOT: define{{.*}}foo{{.*}}
+
+const fn bar() {}
+
+pub const BAR: () = bar();
+
+// CHECK: define{{.*}}bar{{.*}}