Add AST unpretty test for unsafe attribute
This commit is contained in:
parent
80d0d927d5
commit
f249fdd962
11
tests/ui/unpretty/unsafe-attr.rs
Normal file
11
tests/ui/unpretty/unsafe-attr.rs
Normal 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() {}
|
11
tests/ui/unpretty/unsafe-attr.stdout
Normal file
11
tests/ui/unpretty/unsafe-attr.stdout
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user