blob: 86d020e1751ba37ad5addd0557e4e1ddd7cea09c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//! Test for https://github.com/rust-lang/rust/issues/64219
//! Check if `noreturn` attribute is applied on calls to
//! function pointers returning `!` (never type).
#![crate_type = "lib"]
extern "C" {
static FOO: fn() -> !;
}
// CHECK-LABEL: @foo
#[no_mangle]
pub unsafe fn foo() {
// CHECK: call
// CHECK-SAME: [[NUM:#[0-9]+$]]
FOO();
}
// CHECK: attributes [[NUM]] = {{{.*}} noreturn {{.*}}}
|