From 6b67f616e6fb6a2712f658693e4f10cb243ca77b Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 14 Jun 2024 11:16:44 +0200 Subject: [PATCH 1/7] Specify importable entry points --- src/attributes.rst | 2 +- src/functions.rst | 13 ++++---- src/general.rst | 4 +-- src/glossary.rst | 32 ++++++++++++++------ src/program-structure-and-compilation.rst | 36 ++++++++++++++++++----- 5 files changed, 61 insertions(+), 26 deletions(-) diff --git a/src/attributes.rst b/src/attributes.rst index 78c193ac..edb51184 100644 --- a/src/attributes.rst +++ b/src/attributes.rst @@ -1240,7 +1240,7 @@ Attribute ``no_main`` :dp:`fls_6qig3s3qpj0i` :t:`Attribute` :dc:`no_main` indicates that the symbols of the -:t:`main function` will not be present in a binary. +:t:`program entry point` will not be present in a binary. .. rubric:: Examples diff --git a/src/functions.rst b/src/functions.rst index 57976a35..df3f3b08 100644 --- a/src/functions.rst +++ b/src/functions.rst @@ -176,9 +176,13 @@ An :t:`unsafe function` is a :t:`function` subject to :t:`keyword` ``unsafe``. :dp:`fls_5hn8fkf7rcvz` The invocation of an :t:`unsafe function` shall require :t:`unsafe context`. -:dp:`fls_nw49shkqx40b` -A :t:`main function` is a :t:`function` that acts as an entry point into a -program. A :t:`main function` is subject to the following restrictions: +:dp:`fls_kNdIXl86g6Du` +A :t:`function`'s :t:`name` shall not be the :t:`name` ``main`` unless it is in +a :t:`crate root module` of a :t:`crate`. + +:dp:`fls_sbGnkm8Ephiu` +A :t:`main function signature` is a :t:`function signature` subject to the +following restrictions: * :dp:`fls_o4fxok23134r` It lacks :t:`[function qualifier]s` ``async`` and ``unsafe``, @@ -186,9 +190,6 @@ program. A :t:`main function` is subject to the following restrictions: * :dp:`fls_bk755pvc1l53` Its :t:`ABI` is Rust, -* :dp:`fls_5j2vbkt2hitj` - Its :t:`name` is the word ``main``, - * :dp:`fls_a3je4wc53bmo` It lacks :t:`[generic parameter]s`, diff --git a/src/general.rst b/src/general.rst index 5d64db3e..b08a06cd 100644 --- a/src/general.rst +++ b/src/general.rst @@ -238,8 +238,8 @@ external interactions: passed to it; * :dp:`fls_3iekobt8qqi` - Any result returned or :t:`panic` propagated from a :t:`main function` or an - :t:`exported function` to an external caller; + Any result returned or :t:`panic` propagated from a :t:`program entry point` + or an :t:`exported function` to an external caller; * :dp:`fls_qx9fxf4py0j0` The imported and exported :t:`[value]s` at the time of any other interaction diff --git a/src/glossary.rst b/src/glossary.rst index 0be24ef0..e12a1166 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -655,7 +655,9 @@ binary crate ^^^^^^^^^^^^ :dp:`fls_8gfe7hajxkd7` -A :dt:`binary crate` is a :t:`crate` that contains a :t:`main function`. +A :dt:`binary crate` is a :t:`crate` that has a :t:`function` in scope of its +:t:`crate root module` under the :t:`name` ``main`` with a :t:`main function +signature`. .. _fls_or4o65fyt28y: @@ -3721,8 +3723,10 @@ library crate ^^^^^^^^^^^^^ :dp:`fls_3m8lg4mdc2x0` -A :dt:`library crate` is either a :t:`crate` without a :t:`main function` or a -:t:`crate` subject to :t:`attribute` :c:`no_main`. +A :dt:`library crate` is either a :t:`crate` that does not have a :t:`function` +in scope of its :t:`crate root module` under the :t:`name` ``main`` with a +:t:`main function signature` or a :t:`crate` subject to :t:`attribute` +:c:`no_main`. .. _fls_vdhaa61g6kah: @@ -4058,14 +4062,15 @@ macro transcription :dt:`Macro transcription` is the process of producing the expansion of a :t:`declarative macro`. -.. _fls_dz192n9muwpg: +.. _fls_MJ1YWiOpxAa8: -main function -^^^^^^^^^^^^^ +main function signature +^^^^^^^^^^^^^^^^^^^^^^^ -:dp:`fls_au3ovrkenr59` -A :dt:`main function` is a :t:`function` that acts as an entry point into -a program. +:dp:`fls_QijObGZEIykU` + +A :dt:`main function signature` is a :t:`function signature` subject to specific +restrictions. .. _fls_fizf1byuspv2: @@ -5066,6 +5071,15 @@ procedural macro A :dt:`procedural macro` is a :t:`macro` that encapsulates syntactic transformations in a :t:`function`. +.. _fls_SIFecOZqloyx: + +program entry point +^^^^^^^^^^^^^^^^^^^ + +:dp:`fls_9m37hN9zgEQf` +A :dt:`program entry point` is a :t:`function` that is invoked at the start of +a Rust program. + .. _fls_v2rjlovqsdyr: public visibility diff --git a/src/program-structure-and-compilation.rst b/src/program-structure-and-compilation.rst index 78fec92b..5beb567b 100644 --- a/src/program-structure-and-compilation.rst +++ b/src/program-structure-and-compilation.rst @@ -114,21 +114,30 @@ A :t:`crate` is a unit of compilation and linking that contains a tree of nested :t:`[module]s`. :dp:`fls_9ub6ks8qrang` -A :t:`binary crate` is a :t:`crate` that contains a :t:`main function`. A tool -can compile a :t:`binary crate` to an executable. +A :t:`binary crate` is a :t:`crate` that has a :t:`function` in scope of its +:t:`crate root module` under the :t:`name` ``main`` with a :t:`main function +signature`. A tool can compile a :t:`binary crate` to an executable. + +:dp:`fls_jQqXxPyND1ds` +The :t:`function` in scope of a :t:`binary crate`'s :t:`crate root module` under +the :t:`name` ``main`` with a :t:`main function signature` is the :t:`binary +crate`'s :t:`program entry point`. :dp:`fls_d9nn4yuiw1ja` -A :t:`library crate` is either a :t:`crate` without a :t:`main function` or a -:t:`crate` subject to :t:`attribute` :c:`no_main`. A tool is free to compile a -:t:`library crate` to a shared library. +A :t:`library crate` is either a :t:`crate` that does not have a :t:`function` +in scope of its :t:`crate root module` under the :t:`name` ``main`` with a +:t:`main function signature` or a :t:`crate` subject to :t:`attribute` +:c:`no_main`. A tool is free to compile a :t:`library crate` to a shared +library. :dp:`fls_Mf62VqAhoZ3c` A :t:`proc-macro crate` is a :t:`crate` that contains :t:`[procedural macro]s`. A tool is free to compile a :t:`proc-macro crate` to a shared library. -:dp:`fls_cXLyCjs9T3Mj` -A :t:`proc-macro crate` shall not declare :t:`[item]s` with -:t:`public visibility` unless the :t:`item` is a :t:`procedural macro`. +:dp:`fls_RJJmN4tP7j4m` +A :t:`proc-macro crate` shall not declare :t:`[item]s` in its :t:`crate root +module` with :t:`public visibility` unless the :t:`item` is a :t:`procedural +macro`. :dp:`fls_h93C3wfbAoz1` Only a :t:`proc-macro crate` shall declare :t:`[procedural macro]s`. @@ -224,3 +233,14 @@ for all :t:`[attribute]s` up to the invoked :t:`attribute` :c:`cfg`. An :t:`attribute` :c:`cfg_attr` where the related :t:`configuration predicate` evaluates to ``false`` is not considered part of a Rust program. + +.. _fls_8JB3SJqamdpU: + +Program Entry Point +------------------- + +.. rubric:: Legality Rules + +:dp:`fls_dp64b08em9BJ` +A :t:`program entry point` is a :t:`function` that is invoked at the start of +a Rust program. From a3de66c77acc2b907526ef4b24adbccd36a724c0 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 14 Jun 2024 11:55:47 +0200 Subject: [PATCH 2/7] Specify associated type bounds --- src/generics.rst | 14 ++++++++++++++ src/glossary.rst | 10 +++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/generics.rst b/src/generics.rst index 9224ee93..a1df5c0f 100644 --- a/src/generics.rst +++ b/src/generics.rst @@ -311,6 +311,7 @@ Generic Arguments GenericArgument ::= BindingArgument + | BindingBoundArgument | ConstantArgument | LifetimeArgument | TypeArgument @@ -318,6 +319,9 @@ Generic Arguments BindingArgument ::= Identifier $$=$$ TypeSpecification + BindingBoundArgument ::= + Identifier $$:$$ TypeBoundList + ConstantArgument ::= BlockExpression | $$-$$? LiteralExpression @@ -349,6 +353,16 @@ A :s:`LifetimeArgument` shall precede :s:`[BindingArgument]s`, A :t:`binding argument` is a :t:`generic argument` that supplies the :t:`type` of an :t:`associated trait type`. +:dp:`fls_mcUMWsYcxzmZ` +A :t:`binding bound argument` is a :t:`generic argument` that further imposes +:t:`[bound]s` on an :t:`associated trait type`. + +:dp:`fls_dxMfAI4EZVS5` +A :t:`binding bound argument` shall only be used within the confines of a +:t:`type bound predicate`'s :t:`[bound]s`, :t:`[impl trait type]`'s +:t:`[bound]s`, :t:`associated type`'s :t:`[bound]s` or :t:`trait`'s +:t:`[supertrait]s`. + :dp:`fls_i3z9ueoe99zd` A :t:`constant argument` is a :t:`generic argument` that supplies the :t:`value` of a :t:`constant parameter`. diff --git a/src/glossary.rst b/src/glossary.rst index e12a1166..bc9fd00e 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -699,6 +699,15 @@ binding argument A :dt:`binding argument` is a :t:`generic argument` that supplies the :t:`type` of an :t:`associated trait type`. +.. _fls_t2cit5QOte8U: + +binding bound argument +^^^^^^^^^^^^^^^^^^^^^^ + +:dp:`fls_D3i3n4RIReCA` +A :dt:`binding bound argument` is a :t:`generic argument` that further imposes +:t:`[bound]s` on an :t:`associated trait type`. + .. _fls_bv1k866tai6j: binding mode @@ -4068,7 +4077,6 @@ main function signature ^^^^^^^^^^^^^^^^^^^^^^^ :dp:`fls_QijObGZEIykU` - A :dt:`main function signature` is a :t:`function signature` subject to specific restrictions. From 542e007e3a9c8586b9e8b812aebc746760c47151 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 14 Jun 2024 12:20:53 +0200 Subject: [PATCH 3/7] Specify drop scope if and match extension --- src/ownership-and-deconstruction.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ownership-and-deconstruction.rst b/src/ownership-and-deconstruction.rst index 9465b125..dff2bad5 100644 --- a/src/ownership-and-deconstruction.rst +++ b/src/ownership-and-deconstruction.rst @@ -625,6 +625,18 @@ An :dt:`extending expression` is either :t:`array expression`, a :t:`borrow expression`, a :t:`struct expression`, a :t:`tuple expression`, or a :t:`type cast expression`, or +* :dp:`fls_Rj9zhVutfQod` + The :t:`block expression` and :t:`else expression` of an :t:`if expression` + that is an :t:`extending expression`. + +* :dp:`fls_oodpp3LpXC13` + The :t:`expression` of an :t:`else expression` that is an :t:`extending + expression`. + +* :dp:`fls_xGThCPoTUSAi` + The :t:`expression` of a :t:`match arm` of a :t:`match expression` that is an + :t:`extending expression`. + * :dp:`fls_iqw0d1l1lj3i` The :t:`tail expression` of a :t:`block expression` that is an :t:`extending expression`. From 6086955fbf67e610a81083669011646ef24a9a10 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 14 Jun 2024 12:40:49 +0200 Subject: [PATCH 4/7] Specify attribute collapsable_debuginfo --- src/attributes.rst | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/attributes.rst b/src/attributes.rst index edb51184..43792ecd 100644 --- a/src/attributes.rst +++ b/src/attributes.rst @@ -122,6 +122,7 @@ Built-in Attributes AutomaticallyDerivedContent | CfgAttrContent | CfgContent + | CollapseDebuginfoContent | ColdContent | CrateNameContent | CrateTypeContent @@ -1449,6 +1450,42 @@ Attribute ``type_length_limit`` Macros Attributes ~~~~~~~~~~~~~~~~~ +.. _fls_qyudjGHZfyJH: + +Attribute ``collapsable_debuginfo`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. rubric:: Syntax + +.. syntax:: + + CollapseDebuginfoContent ::= + $$collapsable_debuginfo$$ $$($$ CollapseDebuginfoKind $$)$$ + CollapseDebuginfoKind ::= + $$no + | $$external$$ + | $$yes$$ + +.. rubric:: Legality Rules + +:dp:`fls_EzKHtWHmXMAZ` +:t:`Attribute` :c:`collapsable_debuginfo` shall apply to :t:`[declarative macro]s`. + +:dp:`fls_BCvJpfQMYEcD` +:t:`Attribute` :dc:`collapse_debuginfo` changes the debug location information +for the expanded code of the :t:`declarative macro` to its invocation site. This +repeats recursively to the top most expansion of a :t:`declarative macro` that +is not annotated with :t:`attribute` :c:`collapse_debuginfo`. + +.. rubric:: Examples + +.. code-block:: rust + + #[collapse_debuginfo] + macro_rules! m { + () => {}; + } + .. _fls_e0a96eb6ux3y: Attribute ``macro_export`` From 70da9b2db399b9e238215486446e3237987b8066 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 14 Jun 2024 13:04:21 +0200 Subject: [PATCH 5/7] Specify const block expressions --- src/entities-and-resolution.rst | 4 +++ src/expressions.rst | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/src/entities-and-resolution.rst b/src/entities-and-resolution.rst index 5307db6b..77758ffe 100644 --- a/src/entities-and-resolution.rst +++ b/src/entities-and-resolution.rst @@ -496,6 +496,10 @@ related :t:`let statement` appears. The :t:`binding` of a :t:`match arm` is :t:`in scope` within its related :t:`[expression]s` and related :t:`match arm guard`. +:dp:`fls_eBacCVlDaKYK` +A :t:`binding` declared outside of a :t:`const block expression` is not :t:`in +scope` within such a :t:`const block expression`. + .. _fls_ftphlagzd2te: Generic Parameter Scope diff --git a/src/expressions.rst b/src/expressions.rst index c1e3cad6..3c53f823 100644 --- a/src/expressions.rst +++ b/src/expressions.rst @@ -20,6 +20,7 @@ Expressions OuterAttributeOrDoc* ( AsyncBlockExpression | BlockExpression + | ConstBlockExpression | IfExpression | IfLetExpression | LoopExpression @@ -316,6 +317,9 @@ A :t:`constant context` is a :t:`construct` that requires a * :dp:`fls_ib8p7dfwddx2` The :t:`static initializer` of a :t:`static`. +* :dp:`fls_ucFupTeCyylb` + The :t:`block expression` of a :t:`const block expression`. + :dp:`fls_ox6sgl9n43g2` It is a static error to create a :t:`mutable reference` in a :t:`constant context`. @@ -784,6 +788,48 @@ the :t:`[capture target]s` of the :t:`async block expression`. 42 } +.. _fls_G59PiNQkVUnQ: + +Const Blocks +~~~~~~~~~~~~ + +.. rubric:: Syntax + +.. syntax:: + + ConstBlockExpression ::= + $$const$$ BlockExpression + +.. rubric:: Legality Rules + +:dp:`fls_0lcunL4bo8ka` +A :t:`const block expression` is a :t:`block expression` that is specified +with :t:`keyword` ``const`` and encapsulates behavior which is evaluated +statically. + +:dp:`fls_veEGzEbpT4ny` +An :t:`const block expression` denotes a new :t:`control flow boundary`. + +:dp:`fls_PiUS1hF3dv9U` +The :t:`block expression` of a :t:`const block expression` shall be a +:t:`constant expression`. + +:dp:`fls_wuwb0SnpP6Zu` +The :t:`type` of a :t:`const block expression` is the :t:`type` of the +containing :t:`block expression`. + +:dp:`fls_2i7TD7VoQk4B` +The :t:`value` of a :t:`const block expression` is the :t:`value` of the +contained :t:`block expression`. + +.. rubric:: Examples + +.. code-block:: rust + + const { + 42 + } + .. _fls_0ybsR1hEo7wV: Named Blocks From 597689da9be29ff43a91b9f31ae1e778e8247694 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 19 Jun 2024 14:12:46 +0200 Subject: [PATCH 6/7] Rewrite crate-types paragraphs --- src/functions.rst | 29 ------------ src/glossary.rst | 29 ++++++------ src/program-structure-and-compilation.rst | 56 ++++++++++++++++++----- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/functions.rst b/src/functions.rst index df3f3b08..d85f7b4c 100644 --- a/src/functions.rst +++ b/src/functions.rst @@ -176,35 +176,6 @@ An :t:`unsafe function` is a :t:`function` subject to :t:`keyword` ``unsafe``. :dp:`fls_5hn8fkf7rcvz` The invocation of an :t:`unsafe function` shall require :t:`unsafe context`. -:dp:`fls_kNdIXl86g6Du` -A :t:`function`'s :t:`name` shall not be the :t:`name` ``main`` unless it is in -a :t:`crate root module` of a :t:`crate`. - -:dp:`fls_sbGnkm8Ephiu` -A :t:`main function signature` is a :t:`function signature` subject to the -following restrictions: - -* :dp:`fls_o4fxok23134r` - It lacks :t:`[function qualifier]s` ``async`` and ``unsafe``, - -* :dp:`fls_bk755pvc1l53` - Its :t:`ABI` is Rust, - -* :dp:`fls_a3je4wc53bmo` - It lacks :t:`[generic parameter]s`, - -* :dp:`fls_w8q15zp7kyl0` - It lacks :t:`[function parameter]s`, - -* :dp:`fls_4psnfphsgdek` - It lacks a :t:`return type`, - -* :dp:`fls_m7xfrhqif74` - It lacks a :t:`where clause`, - -* :dp:`fls_qq9fzrw4aykd` - It has a :t:`function body`. - .. rubric:: Examples .. code-block:: rust diff --git a/src/glossary.rst b/src/glossary.rst index bc9fd00e..6b0f089b 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -655,9 +655,7 @@ binary crate ^^^^^^^^^^^^ :dp:`fls_8gfe7hajxkd7` -A :dt:`binary crate` is a :t:`crate` that has a :t:`function` in scope of its -:t:`crate root module` under the :t:`name` ``main`` with a :t:`main function -signature`. +A :dt:`binary crate` is a :t:`crate` whose :t:`crate type` is ``bin``. .. _fls_or4o65fyt28y: @@ -1568,6 +1566,16 @@ crate root module A :dt:`crate root module` is the root of the nested :t:`module` tree of a :t:`crate`. +.. _fls_lVpE4uFDsXH4: + +crate type +^^^^^^^^^^ + +:dp:`fls_eaxsgPMFNH7f` +The :dt:`crate type` of a :t:`crate` is the value of the :t:`attribute` +``crate_type`` of a :t:`crate` or the value of ``--crate-type`` flag passed to +the tool compiling the :t:`crate`. + .. _fls_76cj65bptdpn: dangling @@ -3726,17 +3734,6 @@ lexical element A :dt:`lexical element` is the most basic syntactic element in program text. -.. _fls_r1sk7vdgckym: - -library crate -^^^^^^^^^^^^^ - -:dp:`fls_3m8lg4mdc2x0` -A :dt:`library crate` is either a :t:`crate` that does not have a :t:`function` -in scope of its :t:`crate root module` under the :t:`name` ``main`` with a -:t:`main function signature` or a :t:`crate` subject to :t:`attribute` -:c:`no_main`. - .. _fls_vdhaa61g6kah: lifetime @@ -5068,7 +5065,7 @@ proc-macro crate .. _fls_AjjdLZWiL9Tq: :dp:`fls_DfTszT1PjV7o` -A :dt:`proc-macro crate` is a :t:`crate` that contains :t:`[procedural macro]s`. +A :t:`proc-macro crate` is a :t:`crate` whose :t:`crate type` is ``proc-macro``. .. _fls_sp5wdsxwmxf: @@ -5210,7 +5207,7 @@ A :dt:`range pattern` is a :t:`pattern` that matches :t:`[value]s` which fall within a range. :dp:`fls_r36uf3y2denr` -See ``RangePattern.`` +See ``RangePattern``. .. _fls_3ls9xlgt8ei1: diff --git a/src/program-structure-and-compilation.rst b/src/program-structure-and-compilation.rst index 5beb567b..adbc6353 100644 --- a/src/program-structure-and-compilation.rst +++ b/src/program-structure-and-compilation.rst @@ -113,26 +113,33 @@ Crates A :t:`crate` is a unit of compilation and linking that contains a tree of nested :t:`[module]s`. +:dp:`fls_unxalgMqIr3v` +The :t:`crate type` of a :t:`crate` is the value of the :t:`attribute` +``crate_type`` of a :t:`crate` or the value of ``--crate-type`` flag passed to +the tool compiling the :t:`crate`. + +:dp:`fls_e7jGvXvTsFpC` +The :t:`crate type` of a :t:`crate` if not specified is ``bin``. + +:dp:`fls_kQiJPwb2Hjcc` +A :t:`crate` may be subject to multiple :t:`[crate type]s`, treating each type +as a separate :t:`crate`. + :dp:`fls_9ub6ks8qrang` -A :t:`binary crate` is a :t:`crate` that has a :t:`function` in scope of its -:t:`crate root module` under the :t:`name` ``main`` with a :t:`main function -signature`. A tool can compile a :t:`binary crate` to an executable. +A :t:`binary crate` is a :t:`crate` whose :t:`crate type` is ``bin``. + +:dp:`fls_OyFwBtDGVimT` +A :t:`binary crate` that is not subject to :t:`attribute` ``no_main`` shall have +a :t:`function` in scope of its :t:`crate root module` under the :t:`name` +``main`` with a :t:`main function signature`. :dp:`fls_jQqXxPyND1ds` The :t:`function` in scope of a :t:`binary crate`'s :t:`crate root module` under the :t:`name` ``main`` with a :t:`main function signature` is the :t:`binary crate`'s :t:`program entry point`. -:dp:`fls_d9nn4yuiw1ja` -A :t:`library crate` is either a :t:`crate` that does not have a :t:`function` -in scope of its :t:`crate root module` under the :t:`name` ``main`` with a -:t:`main function signature` or a :t:`crate` subject to :t:`attribute` -:c:`no_main`. A tool is free to compile a :t:`library crate` to a shared -library. - :dp:`fls_Mf62VqAhoZ3c` -A :t:`proc-macro crate` is a :t:`crate` that contains :t:`[procedural macro]s`. -A tool is free to compile a :t:`proc-macro crate` to a shared library. +A :t:`proc-macro crate` is a :t:`crate` whose :t:`crate type` is ``proc-macro``. :dp:`fls_RJJmN4tP7j4m` A :t:`proc-macro crate` shall not declare :t:`[item]s` in its :t:`crate root @@ -244,3 +251,28 @@ Program Entry Point :dp:`fls_dp64b08em9BJ` A :t:`program entry point` is a :t:`function` that is invoked at the start of a Rust program. + +:dp:`fls_sbGnkm8Ephiu` +A :t:`main function signature` is a :t:`function signature` subject to the +following restrictions: + +* :dp:`fls_o4fxok23134r` + It lacks :t:`[function qualifier]s` ``async`` and ``unsafe``, + +* :dp:`fls_bk755pvc1l53` + Its :t:`ABI` is Rust, + +* :dp:`fls_a3je4wc53bmo` + It lacks :t:`[generic parameter]s`, + +* :dp:`fls_w8q15zp7kyl0` + It lacks :t:`[function parameter]s`, + +* :dp:`fls_4psnfphsgdek` + It lacks a :t:`return type`, + +* :dp:`fls_m7xfrhqif74` + It lacks a :t:`where clause`, + +* :dp:`fls_qq9fzrw4aykd` + It has a :t:`function body`. From 6874aa7332b43dbd2a61ffbc516c7305ce206f0c Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 3 Jul 2024 10:57:13 +0200 Subject: [PATCH 7/7] Fix collapse_debuginfo mistakes --- src/attributes.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/attributes.rst b/src/attributes.rst index 43792ecd..6232d1db 100644 --- a/src/attributes.rst +++ b/src/attributes.rst @@ -1452,15 +1452,15 @@ Macros Attributes .. _fls_qyudjGHZfyJH: -Attribute ``collapsable_debuginfo`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Attribute ``collapse_debuginfo`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. rubric:: Syntax .. syntax:: CollapseDebuginfoContent ::= - $$collapsable_debuginfo$$ $$($$ CollapseDebuginfoKind $$)$$ + $$collapse_debuginfo$$ $$($$ CollapseDebuginfoKind $$)$$ CollapseDebuginfoKind ::= $$no | $$external$$ @@ -1469,7 +1469,7 @@ Attribute ``collapsable_debuginfo`` .. rubric:: Legality Rules :dp:`fls_EzKHtWHmXMAZ` -:t:`Attribute` :c:`collapsable_debuginfo` shall apply to :t:`[declarative macro]s`. +:t:`Attribute` :c:`collapse_debuginfo` shall apply to :t:`[declarative macro]s`. :dp:`fls_BCvJpfQMYEcD` :t:`Attribute` :dc:`collapse_debuginfo` changes the debug location information @@ -1481,7 +1481,7 @@ is not annotated with :t:`attribute` :c:`collapse_debuginfo`. .. code-block:: rust - #[collapse_debuginfo] + #[collapse_debuginfo(yes)] macro_rules! m { () => {}; }