Add AST unpretty test for unsafe attribute

This commit is contained in:
Urgau 2024-10-26 13:31:24 +02:00
parent 80d0d927d5
commit f249fdd962
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
//@ compile-flags: -Zunpretty=normal
//@ check-pass
#[no_mangle]
extern "C" fn foo() {}
#[unsafe(no_mangle)]
extern "C" fn bar() {}
#[cfg_attr(FALSE, unsafe(no_mangle))]
extern "C" fn zoo() {}

View File

@ -0,0 +1,11 @@
//@ compile-flags: -Zunpretty=normal
//@ check-pass
#[no_mangle]
extern "C" fn foo() {}
#[no_mangle]
extern "C" fn bar() {}
#[cfg_attr(FALSE, unsafe(no_mangle))]
extern "C" fn zoo() {}