diff --git a/src/changelog.rst b/src/changelog.rst index d194400b..9625c0c5 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -52,6 +52,11 @@ Language changes in Rust 1.83.0 * No change: This previous restriction is not specified in the FLS * `Stabilize \`expr_2021\` macro fragment specifier in all editions. `_ + + * Changed syntax: :s:`MacroFragmentSpecifier` + + * Changed paragraphs: :p:`fls_k00bck2k8tde`, :p:`fls_PxR9vNHsaFnI` + * `The \`non_local_definitions\` lint now fires on less code and warns by default. `_ Language changes in Rust 1.82.0 diff --git a/src/macros.rst b/src/macros.rst index e9869644..6e74f8f4 100644 --- a/src/macros.rst +++ b/src/macros.rst @@ -119,6 +119,7 @@ Metavariables MacroFragmentSpecifier ::= $$block$$ | $$expr$$ + | $$expr_2021$$ | $$ident$$ | $$item$$ | $$lifetime$$ @@ -158,7 +159,7 @@ a :t:`metavariable`. :dt:`[fragment specifier restriction]s` on the :t:`[token]s` that follow them: * :dp:`fls_PxR9vNHsaFnI` - ``expr`` shall only be followed by ``=>``, ``,``, or ``;``. + ``expr`` and ``expr_2021`` shall only be followed by ``=>``, ``,``, or ``;``. * :dp:`fls_ePyoTeJJ11N0` ``pat`` shall only be followed by ``=>``, ``,``, ``=``, ``|``, ``if``, or @@ -840,7 +841,7 @@ A :t:`metavariable` in a :t:`macro matcher` is matched against a sequence of :t:`Fragment specifier` **block** requires a :t:`block expression`. * :dp:`fls_k00bck2k8tde` - :t:`Fragment specifier` **expr** requires an :t:`expression`. + :t:`Fragment specifier` **expr** and **expr** requires an :t:`expression` that is not an :t:`underscore expression` or :t:`const block expression`. * :dp:`fls_pf0qrz5nadl2` :t:`Fragment specifier` **ident** requires a :t:`pure identifier`.