Skip to content

Commit 4202c1e

Browse files
committed
make naked function generics test stricter
1 parent 69a0c64 commit 4202c1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Diff for: tests/codegen/naked-fn/generics.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ impl Invert for i64 {
5555
}
5656
}
5757

58-
// CHECK-LABEL: generic_function
5958
// CHECK: .balign 4
59+
// CHECK-LABEL: generic_function:
6060
// CHECK: call
6161
// CHECK: ret
6262

6363
#[naked]
64+
#[no_mangle]
6465
pub extern "C" fn generic_function<T: Invert>(x: i64) -> i64 {
6566
unsafe {
6667
naked_asm!(
@@ -75,8 +76,8 @@ pub extern "C" fn generic_function<T: Invert>(x: i64) -> i64 {
7576
#[repr(transparent)]
7677
struct Foo(u64);
7778

78-
// CHECK-LABEL: method
7979
// CHECK: .balign 4
80+
// CHECK-LABEL: method:
8081
// CHECK: mov rax, rdi
8182

8283
impl Foo {
@@ -87,8 +88,8 @@ impl Foo {
8788
}
8889
}
8990

90-
// CHECK-LABEL: trait_method
9191
// CHECK: .balign 4
92+
// CHECK-LABEL: trait_method:
9293
// CHECK: mov rax, rdi
9394

9495
trait Bar {
@@ -103,8 +104,8 @@ impl Bar for Foo {
103104
}
104105
}
105106

106-
// CHECK-LABEL: naked_with_args_and_return
107107
// CHECK: .balign 4
108+
// CHECK-LABEL: naked_with_args_and_return:
108109
// CHECK: lea rax, [rdi + rsi]
109110

110111
// this previously ICE'd, see https://github.com/rust-lang/rust/issues/124375

0 commit comments

Comments
 (0)