diff options
| author | Michael Goulet <michael@errs.io> | 2024-12-18 18:28:08 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-12-21 20:37:27 +0000 |
| commit | 28a997fa4420547e58974350656a340175a846b4 (patch) | |
| tree | 50a6a7628357d3205d467e5acd9ddadf6791e167 /tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed | |
| parent | 4c40c89c26e9a6c761e2c6d44662028e33e9cb04 (diff) | |
| download | rust-28a997fa4420547e58974350656a340175a846b4.tar.gz rust-28a997fa4420547e58974350656a340175a846b4.zip | |
Properly record metavar spans for other expansions other than TT
Diffstat (limited to 'tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed')
| -rw-r--r-- | tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed index 586881d1807..9b4c9de031b 100644 --- a/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed +++ b/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-fix.fixed @@ -40,6 +40,15 @@ macro_rules! meta2 { } } +macro_rules! with_cfg_attr { + () => { + #[cfg_attr(all(), unsafe(link_section = ".custom_section"))] + //~^ ERROR: unsafe attribute used without unsafe + //~| WARN this is accepted in the current edition + pub extern "C" fn abc() {} + }; +} + tt!([unsafe(no_mangle)]); //~^ ERROR: unsafe attribute used without unsafe //~| WARN this is accepted in the current edition @@ -52,6 +61,8 @@ meta2!(unsafe(export_name = "baw")); //~| WARN this is accepted in the current edition ident2!(export_name, "bars"); +with_cfg_attr!(); + #[unsafe(no_mangle)] //~^ ERROR: unsafe attribute used without unsafe //~| WARN this is accepted in the current edition |
