diff options
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.rs')
-rw-r--r-- | tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.rs b/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.rs new file mode 100644 index 000000000..9f604aafd --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.rs @@ -0,0 +1,17 @@ +// gate-test-allow_internal_unsafe + +#![allow(unused_macros)] + +macro_rules! bar { + () => { + // more layers don't help: + #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps + macro_rules! baz { + () => {} + } + } +} + +bar!(); + +fn main() {} |