Skip to content

Commit 50b07aa

Browse files
committed
add reachability test for const bodies
1 parent db8aca4 commit 50b07aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: tests/codegen/dont_codegen_private_const_fn_only_used_in_const_eval.rs

+6
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ const fn foo() {}
88
pub static FOO: () = foo();
99

1010
// CHECK-NOT: define{{.*}}foo{{.*}}
11+
12+
const fn bar() {}
13+
14+
pub const BAR: () = bar();
15+
16+
// CHECK: define{{.*}}bar{{.*}}

0 commit comments

Comments
 (0)