Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Language changes in Rust 1.99.0

- `Stabilize '#[my_macro] mod foo;' <https://github.com/rust-lang/rust/pull/157857>`_

New paragraphs:

- :p:`fls_TFDKS0Nl3Rwh`
- :p:`fls_yJma4E9orknX`

- `Fix the 'overflowing_literals' lint with repeated negation <https://github.com/rust-lang/rust/pull/158302>`_

- Lints are outside the scope of the FLS
Expand Down
9 changes: 9 additions & 0 deletions src/macros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading