diff options
| author | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-04-28 15:43:07 -0500 |
|---|---|---|
| committer | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-06-06 20:26:28 -0500 |
| commit | 48851d9adbd358a678e8ef8102d131aaa42884fc (patch) | |
| tree | 2ea0d205de82aecdae7cf706adca476808bfc649 | |
| parent | 6ec492fddea96012db4ec8473de3bb27718a25b3 (diff) | |
| download | rust-48851d9adbd358a678e8ef8102d131aaa42884fc.tar.gz rust-48851d9adbd358a678e8ef8102d131aaa42884fc.zip | |
Add tests
| -rw-r--r-- | tests/ui/attributes/unsafe/cfg-unsafe-attributes.rs | 7 | ||||
| -rw-r--r-- | tests/ui/attributes/unsafe/unsafe-attributes.rs | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/attributes/unsafe/cfg-unsafe-attributes.rs b/tests/ui/attributes/unsafe/cfg-unsafe-attributes.rs new file mode 100644 index 00000000000..ce365d1a8b1 --- /dev/null +++ b/tests/ui/attributes/unsafe/cfg-unsafe-attributes.rs @@ -0,0 +1,7 @@ +//@ build-pass +#![feature(unsafe_attributes)] + +#[cfg_attr(all(), unsafe(no_mangle))] +fn a() {} + +fn main() {} diff --git a/tests/ui/attributes/unsafe/unsafe-attributes.rs b/tests/ui/attributes/unsafe/unsafe-attributes.rs new file mode 100644 index 00000000000..e7620a18048 --- /dev/null +++ b/tests/ui/attributes/unsafe/unsafe-attributes.rs @@ -0,0 +1,7 @@ +//@ build-pass +#![feature(unsafe_attributes)] + +#[unsafe(no_mangle)] +fn a() {} + +fn main() {} |
