Skip to content

Commit e860f8e

Browse files
committed
Add test for issue #91490
1 parent 017f6b7 commit e860f8e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/codegen/merge-functions.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// compile-flags: -O
2+
#![crate_type = "lib"]
3+
4+
// CHECK: @func2 = {{.*}}alias{{.*}}@func1
5+
6+
#[no_mangle]
7+
pub fn func1(c: char) -> bool {
8+
c == 's' || c == 'm' || c == 'h' || c == 'd' || c == 'w'
9+
}
10+
11+
#[no_mangle]
12+
pub fn func2(c: char) -> bool {
13+
matches!(c, 's' | 'm' | 'h' | 'd' | 'w')
14+
}

0 commit comments

Comments
 (0)