Skip to content

Commit 22ac798

Browse files
committed
Address macros
1 parent c29d41c commit 22ac798

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

text/3373-avoid-nonlocal-definitions-in-fns.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Starting in the Rust 2024 edition:
3434
- An item nested inside a function or closure (through any level of nesting)
3535
may not define an `impl Trait for Type` unless either the `Trait` or the
3636
`Type` is also nested inside the same function or closure.
37+
- An item nested inside a function or closure (through any level of nesting)
38+
may not define an exported macro visible outside the function or closure
39+
(e.g. using `#[macro_export]`).
3740

3841
Rust 2015, 2018, and 2021 continue to permit this, but will produce a
3942
warn-by-default lint.

0 commit comments

Comments
 (0)