Skip to content

Commit 6086955

Browse files
committed
Specify attribute collapsable_debuginfo
1 parent 542e007 commit 6086955

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/attributes.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Built-in Attributes
122122
AutomaticallyDerivedContent
123123
| CfgAttrContent
124124
| CfgContent
125+
| CollapseDebuginfoContent
125126
| ColdContent
126127
| CrateNameContent
127128
| CrateTypeContent
@@ -1449,6 +1450,42 @@ Attribute ``type_length_limit``
14491450
Macros Attributes
14501451
~~~~~~~~~~~~~~~~~
14511452

1453+
.. _fls_qyudjGHZfyJH:
1454+
1455+
Attribute ``collapsable_debuginfo``
1456+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1457+
1458+
.. rubric:: Syntax
1459+
1460+
.. syntax::
1461+
1462+
CollapseDebuginfoContent ::=
1463+
$$collapsable_debuginfo$$ $$($$ CollapseDebuginfoKind $$)$$
1464+
CollapseDebuginfoKind ::=
1465+
$$no
1466+
| $$external$$
1467+
| $$yes$$
1468+
1469+
.. rubric:: Legality Rules
1470+
1471+
:dp:`fls_EzKHtWHmXMAZ`
1472+
:t:`Attribute` :c:`collapsable_debuginfo` shall apply to :t:`[declarative macro]s`.
1473+
1474+
:dp:`fls_BCvJpfQMYEcD`
1475+
:t:`Attribute` :dc:`collapse_debuginfo` changes the debug location information
1476+
for the expanded code of the :t:`declarative macro` to its invocation site. This
1477+
repeats recursively to the top most expansion of a :t:`declarative macro` that
1478+
is not annotated with :t:`attribute` :c:`collapse_debuginfo`.
1479+
1480+
.. rubric:: Examples
1481+
1482+
.. code-block:: rust
1483+
1484+
#[collapse_debuginfo]
1485+
macro_rules! m {
1486+
() => {};
1487+
}
1488+
14521489
.. _fls_e0a96eb6ux3y:
14531490

14541491
Attribute ``macro_export``

0 commit comments

Comments
 (0)