Skip to content

Commit 54d83be

Browse files
committed
Add test
1 parent e69f14b commit 54d83be

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//! This test checks that we do not monomorphize functions that are only
2+
//! used to evaluate static items, but never used in runtime code.
3+
4+
//@compile-flags: --crate-type=lib -Copt-level=0
5+
6+
const fn foo() {}
7+
8+
pub static FOO: () = foo();
9+
10+
// CHECK: define{{.*}}foo{{.*}}

0 commit comments

Comments
 (0)