diff --git a/src/changelog.rst b/src/changelog.rst index b8585bc8..363f5129 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -38,6 +38,11 @@ Language changes in Rust 1.99.0 - `Stabilize '#[my_macro] mod foo;' `_ + New paragraphs: + + - :p:`fls_TFDKS0Nl3Rwh` + - :p:`fls_yJma4E9orknX` + - `Fix the 'overflowing_literals' lint with repeated negation `_ - Lints are outside the scope of the FLS diff --git a/src/macros.rst b/src/macros.rst index b5bcd3cd..d6d2b794 100644 --- a/src/macros.rst +++ b/src/macros.rst @@ -420,6 +420,9 @@ The sole parameter of the :t:`macro implementation function` captures the :t:`token` stream produced from the related :s:`EnumDeclaration`, :s:`StructDeclaration`, or :s:`UnionDeclaration`. +:dp:`fls_TFDKS0Nl3Rwh` +The :t:`token` stream captured by the :t:`function parameter` of the :t:`macro implementation function` of a :t:`derive macro` excludes the contents of the :t:`source file` of any :t:`outline module` declared within the related :t:`abstract data type`, and is produced without loading that :t:`source file`. + :dp:`fls_H5ipqqlH3pJh` A :t:`derive macro` adds all its declared :t:`[derive helper attribute]s` into the :t:`derive helper attribute` scope of the :t:`abstract data type` the @@ -497,6 +500,9 @@ The second :t:`function parameter` of the :t:`macro implementation function` captures the :t:`token` stream produced from the related :t:`item`, including all :t:`[outer attribute]s` that apply to that :t:`item`. +:dp:`fls_yJma4E9orknX` +The :t:`token` stream captured by the second :t:`function parameter` of the :t:`macro implementation function` of an :t:`attribute macro` excludes the contents of the :t:`source file` of any :t:`outline module` that is, or is declared within, the related :t:`item`, and is produced without loading that :t:`source file`. + .. rubric:: Examples .. code-block:: rust @@ -599,6 +605,9 @@ See :p:`fls_4vjbkm4ceymk` for the declaration of #[output_and_return_item] fn attribute_macro_invoker() {} + #[output_and_return_item] + mod outline; + .. _fls_wjldgtio5o75: Macro Expansion