diff --git a/src/changelog.rst b/src/changelog.rst index 62532a17..2dcc76c6 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -19,6 +19,49 @@ with the change that has been applied due to it. just the language changes that had an impact to the FLS. See the `release notes`_ for a full list of changes. +FLS maintenance +--------------- + +- Paragraphs added or changed to ensure all glossary terms are also found in the main text: + + - :p:`fls_BBz4Iy7AeaU4` + - :p:`fls_cxNAtLSLjqbQ` + - :p:`fls_hyi2jnp38v1n` + - :p:`fls_twC8XhwbI60x` + - :p:`fls_9bp4cKSfW9A0` + - :p:`fls_Odh6Z7ivD1U4` + - :p:`fls_FG0EmVgrDUDq` + +- Paragraphs changed to avoid referencing indirect terms: + + - :p:`fls_xmgcdw9yhb55` + - :p:`fls_yeh6mvyvb4dp` + - :p:`fls_657knnsobdyu` + - :p:`fls_m942dwwmr2cl` + - :p:`fls_np33oqrz33mp` + - :p:`fls_atdpr8be2o2r` + - :p:`fls_fbgwb3pdfgz` + - :p:`fls_8tbxq95x06yt` + - :p:`fls_9oy9zo3x3fy3` + - :p:`fls_pdgj2xekdead` + - :p:`fls_4uoi6k8r7mvc` + - :p:`fls_fjaz4m90cagr` + - :p:`fls_eesn9kuylim` + - :p:`fls_ijfmnnrdlu8n` + - :p:`fls_6x7j9x354pkb` + - :p:`fls_h2cpbz2t74hy` + - :p:`fls_whj50spxz3bh` + - :p:`fls_d1cxq1zbt5fq` + - :p:`fls_48i245an2449` + - :p:`fls_69wr03rt0ali` + - :p:`fls_9d970yfwmj2d` + - :p:`fls_p9687v3xckps` + - :p:`fls_8j408kckzzud` + - :p:`fls_mdejdc0nNgyO` + - :p:`fls_WUCvCauUCmsD` + - :p:`fls_5SVthCNZBcVS` + - :p:`fls_SonodAQVL5J4` + Language changes in Rust 1.94.0 ------------------------------- diff --git a/src/expressions.rst b/src/expressions.rst index 848fb111..799129c9 100644 --- a/src/expressions.rst +++ b/src/expressions.rst @@ -2606,60 +2606,60 @@ is used in the calculation of a :t:`compound assignment expression`. An :t:`assigned operand` shall denote a :t:`mutable assignee expression`. :dp:`fls_xmgcdw9yhb55` -The :t:`type` of a :t:`compound assignment` is the :t:`unit type`. +The :t:`type` of a :t:`compound assignment expression` is the :t:`unit type`. :dp:`fls_yeh6mvyvb4dp` -The :t:`value` of a :t:`compound assignment` is the :t:`unit value`. +The :t:`value` of a :t:`compound assignment expression` is the :t:`unit value`. :dp:`fls_657knnsobdyu` -The :t:`type` of the :t:`assigned operand` of an :t:`addition assignment` shall +The :t:`type` of the :t:`assigned operand` of an :t:`addition assignment expression` shall implement the :std:`core::ops::AddAssign` trait where the type of the right operand is the trait implementation type parameter. :dp:`fls_m942dwwmr2cl` -The :t:`type` of the :t:`assigned operand` of a :t:`bit and assignment` shall +The :t:`type` of the :t:`assigned operand` of a :t:`bit and assignment expression` shall implement the :std:`core::ops::BitAndAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_np33oqrz33mp` -The :t:`type` of the :t:`assigned operand` of a :t:`bit or assignment` shall +The :t:`type` of the :t:`assigned operand` of a :t:`bit or assignment expression` shall implement the :std:`core::ops::BitOrAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_atdpr8be2o2r` -The :t:`type` of the :t:`assigned operand` of a :t:`bit xor assignment` shall +The :t:`type` of the :t:`assigned operand` of a :t:`bit xor assignment expression` shall implement the :std:`core::ops::BitXorAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_fbgwb3pdfgz` -The :t:`type` of the :t:`assigned operand` of a :t:`division assignment` shall +The :t:`type` of the :t:`assigned operand` of a :t:`division assignment expression` shall implement the :std:`core::ops::DivAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_8tbxq95x06yt` -The :t:`type` of the :t:`assigned operand` of a :t:`multiplication assignment` +The :t:`type` of the :t:`assigned operand` of a :t:`multiplication assignment expression` shall implement the :std:`core::ops::MulAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_9oy9zo3x3fy3` -The :t:`type` of the :t:`assigned operand` of a :t:`remainder assignment` shall +The :t:`type` of the :t:`assigned operand` of a :t:`remainder assignment expression` shall implement the :std:`core::ops::RemAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_pdgj2xekdead` -The :t:`type` of the :t:`assigned operand` of a :t:`shift left assignment` shall +The :t:`type` of the :t:`assigned operand` of a :t:`shift left assignment expression` shall implement the :std:`core::ops::ShlAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_4uoi6k8r7mvc` -The :t:`type` of the :t:`assigned operand` of a :t:`shift right assignment` +The :t:`type` of the :t:`assigned operand` of a :t:`shift right assignment expression` shall implement the :std:`core::ops::ShrAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. :dp:`fls_fjaz4m90cagr` -The :t:`type` of the :t:`assigned operand` of a :t:`subtraction assignment` +The :t:`type` of the :t:`assigned operand` of a :t:`subtraction assignment expression` shall implement the :std:`core::ops::SubAssign` :t:`trait` where the :t:`type` of the :t:`modifying operand` is the :t:`trait implementation` :t:`type parameter`. @@ -2667,7 +2667,7 @@ of the :t:`modifying operand` is the :t:`trait implementation` .. rubric:: Dynamic Semantics :dp:`fls_eesn9kuylim` -The :t:`evaluation` of a :t:`compound assignment` proceeds as follows: +The :t:`evaluation` of a :t:`compound assignment expression` proceeds as follows: #. :dp:`fls_4nnqz4etisgw` If the :t:`[type]s` of both :t:`[operand]s` are :t:`[integer type]s` or :t:`[floating-point type]s`, then @@ -2694,52 +2694,52 @@ The :t:`evaluation` of a :t:`compound assignment` proceeds as follows: The appropriate :t:`function` is invoked as indicated below. :dp:`fls_ijfmnnrdlu8n` -For an :t:`addition assignment`, +For an :t:`addition assignment expression`, ``core::ops::AddAssign::add_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_6x7j9x354pkb` -For a :t:`bit and assignment`, +For a :t:`bit and assignment expression`, ``core::ops::BitAndAssign::bitand_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_h2cpbz2t74hy` -For a :t:`bit or assignment`, +For a :t:`bit or assignment expression`, ``core::ops::BitOrAssign::bitor_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_whj50spxz3bh` -For a :t:`bit xor assignment`, +For a :t:`bit xor assignment expression`, ``core::ops::BitXorAssign::bitxor_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_d1cxq1zbt5fq` -For a :t:`division assignment`, +For a :t:`division assignment expression`, ``core::ops::DivAssign::div_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_48i245an2449` -For a :t:`multiplication assignment`, +For a :t:`multiplication assignment expression`, ``core::ops::MulAssign::mul_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_69wr03rt0ali` -For a :t:`remainder assignment`, +For a :t:`remainder assignment expression`, ``core::ops::RemAssign::rem_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_9d970yfwmj2d` -For a :t:`shift left assignment`, +For a :t:`shift left assignment expression`, ``core::ops::ShlAssign::shl_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_p9687v3xckps` -For a :t:`shift right assignment`, +For a :t:`shift right assignment expression`, ``core::ops::ShrAssign::shr_assign(&mut assigned_operand, modifying_operand)`` is invoked. :dp:`fls_8j408kckzzud` -For a :t:`subtraction assignment`, +For a :t:`subtraction assignment expression`, ``core::ops::SubAssign::sub_assign(&mut assigned_operand, modifying_operand)`` is invoked. @@ -3562,6 +3562,9 @@ The :t:`evaluation` of a :t:`method call expression` proceeds as follows: Call Conformance ~~~~~~~~~~~~~~~~ +:dp:`fls_BBz4Iy7AeaU4` +:dt:`Call conformance` measures the compatibility between a set of :t:`[argument operand]s` and a set of :t:`[function parameter]s` or :t:`[field]s`. + :dp:`fls_tsn6SUUG9LvW` A :t:`method call expression` is equivalent to a :t:`call expression` where the :t:`call operand` is the resolved :t:`method` and the adjusted diff --git a/src/generics.rst b/src/generics.rst index 54df8103..e59664bd 100644 --- a/src/generics.rst +++ b/src/generics.rst @@ -123,8 +123,10 @@ A :t:`generic union` shall use all of its :t:`[type parameter]s` and :t:`[lifetime parameter]s` at least once in at least one of its :t:`[field]s`. :dp:`fls_hyi2jnp38v1n` -A :t:`generic parameter` is said to constrain an :t:`implementation` if the -:t:`generic parameter` appears at least once in one of the following: +A :t:`generic parameter` is said to :dt:`constrain` an :t:`implementation` if it makes the applicability of the :t:`implementation` more narrow. + +:dp:`fls_cxNAtLSLjqbQ` +A :t:`[constrain]t` happens when a :t:`generic parameter` appears at least once in one of the following: * :dp:`fls_sseo6u6pbcki` As a :t:`binding argument` in the :t:`[trait bound]s` of a :t:`type` that @@ -461,7 +463,7 @@ of the :t:`type parameter`. Any remaining :t:`[generic parameter]s` without corresponding conformant :t:`[generic argument]s` are :t:`[constant parameter]s` with :t:`[constant parameter initializer]s`, :t:`[lifetime parameter]s` with - either inferred :t:`[lifetime argument]s` or :t:`[elided lifetime]s`, + either inferred :t:`[lifetime argument]s` or :t:`elided lifetimes `, :t:`[type parameter]s` with :t:`[type parameter initializer]s` or inferred :t:`[type argument]s`, and diff --git a/src/glossary.rst b/src/glossary.rst index d7d53531..50ea76e9 100644 --- a/src/glossary.rst +++ b/src/glossary.rst @@ -46,11 +46,6 @@ active attribute An :dt:`active attribute` is an :t:`attribute` that is removed from the :t:`item` it decorates. -addition assignment -^^^^^^^^^^^^^^^^^^^ - -For :dt:`addition assignment`, see :t:`addition assignment expression`. - addition assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,12 +93,6 @@ anonymous return type An :dt:`anonymous return type` is an :t:`impl trait type` ascribed to a :t:`function` return type. -anonymous type parameter -^^^^^^^^^^^^^^^^^^^^^^^^ - -An :dt:`anonymous type parameter` is an :t:`impl trait type` ascribed to a -:t:`function parameter`. - any configuration predicate ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -239,11 +228,6 @@ An :dt:`assignee operand` is the target :t:`operand` of an See :s:`AssigneeOperand`. -assignment -^^^^^^^^^^ - -See :t:`assignment expression`. - assignment expression ^^^^^^^^^^^^^^^^^^^^^ @@ -384,11 +368,6 @@ async function An :dt:`async function` is a :t:`function` subject to :t:`keyword` ``async``. -atomic -^^^^^^ - -See :t:`atomic type`. - atomic type ^^^^^^^^^^^ @@ -500,11 +479,6 @@ binding scope A :dt:`binding scope` is a :t:`scope` for :t:`[binding]s`. -bit and assignment -^^^^^^^^^^^^^^^^^^ - -For :dt:`bit and assignment`, see :t:`bit and assignment expression`. - bit and assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -529,11 +503,6 @@ two :t:`[operand]s` using bit arithmetic. See :s:`BitExpression`. -bit or assignment -^^^^^^^^^^^^^^^^^ - -For :dt:`bit or assignment`, see :t:`bit or assignment expression`. - bit or assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -549,11 +518,6 @@ A :dt:`bit or expression` is a :t:`bit expression` that uses bit or arithmetic. See :s:`BitOrExpression`. -bit xor assignment -^^^^^^^^^^^^^^^^^^ - -For :dt:`bit xor assignment`, see :t:`bit xor assignment expression`. - bit xor assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -716,9 +680,7 @@ See :s:`CStringLiteral`. Call conformance ^^^^^^^^^^^^^^^^ -:dt:`Call conformance` measures the compatibility between a set of -:t:`[argument operand]s` and a set if :t:`[function parameter]s` or -:t:`[field]s`. +:dt:`Call conformance` measures the compatibility between a set of :t:`[argument operand]s` and a set of :t:`[function parameter]s` or :t:`[field]s`. call expression ^^^^^^^^^^^^^^^ @@ -866,11 +828,6 @@ compilation root A :dt:`compilation root` is an input to a compilation performed by a tool. -compound assignment -^^^^^^^^^^^^^^^^^^^ - -For :dt:`compound assignment`, see :t:`compound assignment expression`. - compound assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -977,8 +934,7 @@ into a :t:`constant`. constrain ^^^^^^^^^ -A :t:`generic parameter` is said to :dt:`constrain` an :t:`implementation` if -it makes the :t:`[implementation]'s` applicability more narrow. +A :t:`generic parameter` is said to :dt:`constrain` an :t:`implementation` if it makes the applicability of the :t:`implementation` more narrow. construct ^^^^^^^^^ @@ -1049,11 +1005,6 @@ A :dt:`crate public modifier` is a :t:`visibility modifier` that grants a See :s:`CratePublicModifier`. -crate root -^^^^^^^^^^ - -A :dt:`crate root` is an entry point into a :t:`crate`. - crate root module ^^^^^^^^^^^^^^^^^ @@ -1213,11 +1164,6 @@ diverging type variable A :dt:`diverging type variable` is a :t:`type variable` that can refer to any :t:`type` and originates from a :t:`diverging expression`. -division assignment -^^^^^^^^^^^^^^^^^^^ - -For :dt:`division assignment`, see :t:`division assignment expression`. - division assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1296,18 +1242,6 @@ a :t:`slice type`. See :s:`ElementType`. -elided -^^^^^^ - -For :dt:`elided`, see :t:`elided lifetime`. - -elided lifetime -^^^^^^^^^^^^^^^ - -An :dt:`elided lifetime` is either an :t:`unnamed lifetime` or a :t:`lifetime` -that has been explicitly omitted from a :t:`function signature` or an -:t:`implementation`. - else expression ^^^^^^^^^^^^^^^ @@ -1390,11 +1324,6 @@ solidus), followed by the single character encoding of the special meaning character. For example, ``\t`` is the escaped character for 0x09 (horizontal tabulation). -evaluated -^^^^^^^^^ - -See :t:`evaluation`. - evaluation ^^^^^^^^^^ @@ -1409,11 +1338,6 @@ An :dt:`exclusive range pattern` is a :t:`range pattern` with both a See :s:`ExclusiveRangePattern`. -executed -^^^^^^^^ - -See :t:`execution`. - execution ^^^^^^^^^ @@ -1517,11 +1441,6 @@ f64 :dc:`f64` is a :t:`floating-point type` equivalent to the IEEE 754-2008 binary64 :t:`type`. -fat pointer -^^^^^^^^^^^ - -A :dt:`fat pointer` is a :t:`value` of a :t:`fat pointer type`. - fat pointer type ^^^^^^^^^^^^^^^^ @@ -1554,11 +1473,6 @@ A :dt:`field index` is the position of a :t:`field` within a See :s:`FieldIndex`. -field list -^^^^^^^^^^ - -A :dt:`field list` is a :s:`RecordStructFieldList` or :s:`TupleStructFieldList`. - field resolution ^^^^^^^^^^^^^^^^ @@ -2019,12 +1933,6 @@ immutable static An :dt:`immutable static` is a :t:`static` whose :t:`value` cannot be modified. -immutable variable -^^^^^^^^^^^^^^^^^^ - -An :dt:`immutable variable` is a :t:`variable` whose :t:`value` cannot be -modified. - impl header lifetime elision ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2115,24 +2023,6 @@ An :dt:`inclusive range pattern` is a :t:`range pattern` with both a See :s:`InclusiveRangePattern`. -incomplete associated constant -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -An :dt:`incomplete associated constant` is an :t:`associated constant` without -a :t:`constant initializer`. - -incomplete associated function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -An :dt:`incomplete associated function` is an :t:`associated function` without -a :t:`function body`. - -incomplete associated type -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -An :dt:`incomplete associated type` is an :t:`associated type` without an -:t:`initialization type`. - index expression ^^^^^^^^^^^^^^^^ @@ -2617,16 +2507,6 @@ local type A :dt:`local type` is a :t:`type` that is defined in the current :t:`crate`. -local variable -^^^^^^^^^^^^^^ - -For :dt:`local variable`, see :t:`variable`. - -loop -^^^^ - -For :dt:`loop`, see :t:`loop expression`. - loop body ^^^^^^^^^ @@ -2860,12 +2740,6 @@ multi segment path A :dt:`multi segment path` is a :t:`path` consisting of more than one :t:`path segment`. -multiplication assignment -^^^^^^^^^^^^^^^^^^^^^^^^^ - -For :dt:`multiplication assignment`, see -:t:`multiplication assignment expression`. - multiplication assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -3091,12 +2965,6 @@ object safe A :t:`trait` is :dt:`object safe` when it can be used as a :t:`trait object type`. -object safety -^^^^^^^^^^^^^ - -:dt:`Object safety` is the process of determining whether a :t:`trait` can be -used as a :t:`trait object type`. - obsolete range pattern ^^^^^^^^^^^^^^^^^^^^^^ @@ -3343,12 +3211,6 @@ place expression context A :dt:`place expression context` is a :t:`construct` that may evaluate its operand as a memory location. -plane -^^^^^ - -In :t:`Unicode`, a :dt:`plane` is a continuous group of 65,536 -:t:`[code point]s`. - pointer ^^^^^^^ @@ -3675,11 +3537,6 @@ record struct type A :dt:`record struct type` is the :t:`type` of a :t:`record struct`. -record struct value -^^^^^^^^^^^^^^^^^^^ - -A :dt:`record struct value` is a :t:`value` of a :t:`record struct type`. - recursive type ^^^^^^^^^^^^^^ @@ -3804,11 +3661,6 @@ A :dt:`register parameter modifier` is a substring that starts with character 0x3A (colon), follows a :t:`register parameter`, and changes the formatting of the related :t:`register parameter`. -remainder assignment -^^^^^^^^^^^^^^^^^^^^ - -For :dt:`remainder assignment`, see :t:`remainder assignment expression`. - remainder assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -3849,11 +3701,6 @@ of times a :t:`macro repetition in matching` or a See :s:`MacroRepetitionOperator`. -representation -^^^^^^^^^^^^^^ - -See :t:`type representation`. - representation modifier ^^^^^^^^^^^^^^^^^^^^^^^ @@ -4014,11 +3861,6 @@ shared reference type A :dt:`shared reference type` is a :t:`reference type` not subject to :t:`keyword` ``mut``. -shift left assignment -^^^^^^^^^^^^^^^^^^^^^ - -For :dt:`shift left assignment`, see :t:`shift left assignment expression`. - shift left assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -4035,11 +3877,6 @@ arithmetic. See :s:`ShiftLeftExpression`. -shift right assignment -^^^^^^^^^^^^^^^^^^^^^^ - -For :dt:`shift right assignment`, see :t:`shift right assignment expression`. - shift right assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -4335,11 +4172,6 @@ subpattern A :dt:`subpattern` is a :t:`pattern` nested within another :t:`pattern`. -subtraction assignment -^^^^^^^^^^^^^^^^^^^^^^ - -For :dt:`subtraction assignment`, see :t:`subtraction assignment`. - subtraction assignment expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -4448,13 +4280,12 @@ A :dt:`textual type` is a :t:`type` class that includes type :c:`char` and type thin pointer ^^^^^^^^^^^^ -A :dt:`thin pointer` is a :t:`value` of a :t:`thin pointer type`. +A :dt:`thin pointer` is a :t:`value` of an :t:`indirection type` that refers to a :t:`fixed sized type`. -thin pointer type -^^^^^^^^^^^^^^^^^ +token +^^^^^ -A :dt:`thin pointer type` is an :t:`indirection type` that refers to a -:t:`fixed sized type`. +A :dt:`token` is a :t:`lexical element` that can be consumed by a :t:`macro`. token matching ^^^^^^^^^^^^^^ @@ -4463,12 +4294,6 @@ token matching to fully satisfy a :t:`macro match` of a selected :t:`macro matcher` that belongs to a resolved :t:`declarative macro`. -tokens -^^^^^^ - -:dt:`[Token]s` are a subset of :t:`[lexical element]s` consumed by -:t:`[macro]s`. - trait ^^^^^ @@ -4781,11 +4606,6 @@ u128 :dc:`u128` is an :t:`unsigned integer type` whose :t:`[value]s` range from 0 to 2\ :sup:`128` - 1, all inclusive. -unary operator -^^^^^^^^^^^^^^ - -A :dt:`unary operator` operates on one :t:`operand`. - undefined behavior ^^^^^^^^^^^^^^^^^^ @@ -4832,7 +4652,7 @@ For :dt:`unifiable`, see :t:`unify`. unifiable types ^^^^^^^^^^^^^^^ -Two :t:`[type]s` that :t:`unify` are said to be :dt:`[unifiable type]s`. +Two :t:`[type]s` that :t:`unify` are said to be :dt:`unifiable types`. unified type ^^^^^^^^^^^^ @@ -4877,12 +4697,12 @@ A :dt:`unique immutable reference` is an :t:`immutable reference` produced by unit enum variant ^^^^^^^^^^^^^^^^^ -A :dt:`unit enum variant` is an :t:`enum variant` without a :t:`field list`. +A :dt:`unit enum variant` is an :t:`enum variant` without a :s:`RecordStructFieldList` or :s:`TupleStructFieldList`. unit struct ^^^^^^^^^^^ -A :dt:`unit struct` is a :t:`struct` without a :t:`field list`. +A :dt:`unit struct` is a :t:`struct` without a :s:`RecordStructFieldList` or a :s:`TupleStructFieldList`. See :s:`UnitStructDeclaration`. @@ -4892,16 +4712,6 @@ unit struct constant A :dt:`unit struct constant` is a :t:`constant` implicitly created by a :t:`unit struct`. -unit struct type -^^^^^^^^^^^^^^^^ - -A :dt:`unit struct type` is the :t:`type` of a :t:`unit struct`. - -unit struct value -^^^^^^^^^^^^^^^^^ - -A :dt:`unit struct value` is a :t:`value` of a :t:`unit struct type`. - unit tuple ^^^^^^^^^^ @@ -4923,12 +4733,6 @@ unnamed constant An :dt:`unnamed constant` is a :t:`constant` declared with character 0x5F (low line). -unnamed lifetime -^^^^^^^^^^^^^^^^ - -An :dt:`unnamed lifetime` is a :t:`lifetime` declared with character 0x5F (low -line). - unqualified path expression ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -5171,11 +4975,6 @@ evaluate its :t:`loop body` as long as its :t:`subject let expression` yields a See :s:`WhileLetLoopExpression`. -while loop -^^^^^^^^^^ - -For :dt:`while loop`, see :t:`while loop expression`. - while loop expression ^^^^^^^^^^^^^^^^^^^^^ @@ -5191,11 +4990,6 @@ whitespace string A :dt:`whitespace string` is a string that consists of one or more :t:`[whitespace character]s`. -zero-sized type -^^^^^^^^^^^^^^^ - -A :dt:`zero-sized type` is a :t:`fixed sized type` with :t:`size` zero. - zero-variant enum type ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/inline-assembly.rst b/src/inline-assembly.rst index b2ddc0fc..099715a0 100644 --- a/src/inline-assembly.rst +++ b/src/inline-assembly.rst @@ -580,9 +580,7 @@ If a :t:`value` has a smaller size than the :t:`register` it is allocated in, then * :dp:`fls_drg7v8hxb5ca` - On RISC-V architectures, if the :t:`register` belongs to :t:`register class` - ``freg``, then :c:`f32` :t:`[value]s` are :t:`NaN-boxed `. in a - :c:`f64` :t:`value`. + On RISC-V architectures, if the :t:`register` belongs to :t:`register class` ``freg``, then :c:`f32` :t:`[value]s` are :t:`NaN-boxed ` in a :c:`f64` :t:`value`. * :dp:`fls_78gb8z1fyluc` Otherwise, for an :t:`input register`, the upper bits of the :t:`register` @@ -596,6 +594,9 @@ If a :t:`register argument` has :t:`direction modifier` ``inout`` and an :t:`input-output register expression`, then the :t:`input register expression` and the :t:`output register expression` shall have the same :t:`type`. +:dp:`fls_FG0EmVgrDUDq` +:dt:`NaN-boxing` is a technique for encoding :t:`[value]s` using the low order bits of the mantissa of a 64-bit IEEE floating-point ``NaN``. + .. _fls_hejgghwzblf: Register Arguments diff --git a/src/lexical-elements.rst b/src/lexical-elements.rst index 00357bcf..0fd09f5d 100644 --- a/src/lexical-elements.rst +++ b/src/lexical-elements.rst @@ -1332,6 +1332,12 @@ A :t:`block comment` is a :t:`comment` that spans one or more :t:`[line]s`. :dp:`fls_nayisy85kyq2` A :t:`line comment` is a :t:`comment` that spans exactly one :t:`line`. +:dp:`fls_5SVthCNZBcVS` +A :dt:`syntactic category` is a nonterminal in the Backus-Naur Form grammar definition of the Rust programming language. + +:dp:`fls_SonodAQVL5J4` +A :dt:`construct` is a piece of program text that is an instance of a :t:`syntactic category`. + :dp:`fls_k3hj30hjkdhw` An :t:`inner block doc` is a :t:`block comment` that applies to an enclosing :t:`non-[comment]` :t:`construct`. @@ -1560,4 +1566,3 @@ Word ``union`` acts as a :t:`keyword` only when used in the context of a :dp:`fls_g0JEluWqBpNc` Word ``safe`` acts as a :t:`keyword` only when used as a qualifier of :s:`FunctionDeclaration` or :s:`StaticDeclaration` in the context of a :s:`ExternalBlock`. - diff --git a/src/macros.rst b/src/macros.rst index b5bcd3cd..c0ed280e 100644 --- a/src/macros.rst +++ b/src/macros.rst @@ -25,7 +25,7 @@ distinct forms: return a stream of :t:`[lexical element]s`. :dp:`fls_rnty1c8l5495` -:t:`[Token]s` are a subset of :t:`[lexical element]s` consumed by :t:`[macro]s`. +A :dt:`token` is a :t:`lexical element` that can be consumed by a :t:`macro`. .. _fls_xa7lp0zg1ol2: @@ -1113,4 +1113,3 @@ Every :t:`macro` has associated :t:`hygiene` that depends on its kind: :dp:`fls_7eqqk2cj0clr` The :t:`metavariable` ``$crate`` in a :t:`declarative macro`'s expansion refers to the crate the :t:`declarative macro` was declared in. - diff --git a/src/patterns.rst b/src/patterns.rst index 6d2de0b6..5764ecaf 100644 --- a/src/patterns.rst +++ b/src/patterns.rst @@ -88,7 +88,7 @@ restrictions: * :dp:`fls_kv533rntni1x` Any two :t:`[binding]s` with the same name in the two :t:`[pattern-without-alternation]s` shall have - :t:`[unifiable type]s` and shall have the same :t:`[binding mode]s`. + :t:`unifiable types` and shall have the same :t:`[binding mode]s`. .. _fls_uh76pw6ykd57: diff --git a/src/types-and-traits.rst b/src/types-and-traits.rst index 9efa58dd..93b82211 100644 --- a/src/types-and-traits.rst +++ b/src/types-and-traits.rst @@ -696,6 +696,9 @@ It is a static error if the :t:`value` of a :t:`discriminant` exceeds the maximum :t:`value` of the :t:`type` of the :t:`expression` of a :t:`discriminant initializer`. +:dp:`fls_Odh6Z7ivD1U4` +A :dt:`unit enum variant` is an :t:`enum variant` without a :s:`RecordStructFieldList` or :s:`TupleStructFieldList`. + .. rubric:: Undefined Behavior :dp:`fls_f046du2fkgr6` @@ -764,6 +767,12 @@ Struct Types A :t:`struct type` is an :t:`abstract data type` that is a product of other :t:`[type]s`. +:dp:`fls_mdejdc0nNgyO` +A :dt:`record struct type` is the :t:`type` of a :t:`record struct`. + +:dp:`fls_WUCvCauUCmsD` +A :dt:`record struct field` is a :t:`field` of a :t:`record struct type`. + :dp:`fls_r885av95eivp` The :t:`name` of a :t:`record struct field` shall be unique within the related :s:`RecordStructDeclaration`. @@ -778,6 +787,9 @@ If the :t:`type` of a :t:`tuple struct field` is a :t:`dynamically sized type`, then the :t:`tuple struct field` shall be the last :t:`tuple struct field` in the :s:`TupleStructFieldList`. +:dp:`fls_9bp4cKSfW9A0` +A :dt:`unit struct` is a :t:`struct` without a :s:`RecordStructFieldList` or a :s:`TupleStructFieldList`. + .. rubric:: Examples .. code-block:: rust @@ -1503,6 +1515,9 @@ share a common storage. :dp:`fls_njvdevz0xqc0` The :t:`size` of a :t:`recursive type` shall be finite. +:dp:`fls_twC8XhwbI60x` +A :dt:`thin pointer` is a :t:`value` of an :t:`indirection type` that refers to a :t:`fixed sized type`. + .. _fls_ohhsmifo0urd: Type Representation @@ -1755,7 +1770,7 @@ ranges, and structures of both :t:`[type]s` are compatible according to the rules detailed below. :dp:`fls_aie0tr62vhw5` -Two types that :t:`unify` are said to be :t:`[unifiable type]s`. +Two types that :t:`unify` are said to be :t:`unifiable types`. :dp:`fls_3U7Ue6Xzuv9M` :t:`Type unification` is a symmetric operation. If :t:`type` ``A`` unifies @@ -3305,17 +3320,17 @@ An :dt:`output lifetime` is one of the following :t:`[lifetime]s`: :t:`Lifetime elision` proceeds as follows: #. :dp:`fls_1j204m1wy333` - Each :t:`elided` :t:`input lifetime` is a distinct :t:`lifetime parameter` in + Each :t:`elided ` :t:`input lifetime` is a distinct :t:`lifetime parameter` in its related :t:`construct`. #. :dp:`fls_6km3cbchuxr2` If a :t:`construct` has exactly one :t:`input lifetime`, then that - :t:`lifetime` is assigned to all :t:`elided` :t:`[output lifetime]s`. + :t:`lifetime` is assigned to all :t:`elided ` :t:`[output lifetime]s`. #. :dp:`fls_crb6m6b3cdwh` If a :t:`function` has a :t:`self parameter` with exactly 1 :t:`self input lifetime`, then the :t:`lifetime` of the - :t:`self input lifetime` is assigned to all :t:`elided` + :t:`self input lifetime` is assigned to all :t:`elided ` :t:`[output lifetime]s`. #. :dp:`fls_ac9tdlfwp5et` @@ -3331,7 +3346,7 @@ Given :t:`function` ``f`` of the form fn f <'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; :dp:`fls_vcmmkp9uruhr` -its :t:`lifetime` :t:`elided` form is +its :t:`lifetime` :t:`elided ` form is .. code-block:: rust @@ -3349,16 +3364,16 @@ Static Lifetime Elision the :t:`type ascription` of :t:`[constant]s` and :t:`[static]s`. :dp:`fls_8irr97rZWfSC` -An :t:`elided` :t:`lifetime` of a :t:`reference type` or :t:`path` in the +An :t:`elided ` :t:`lifetime` of a :t:`reference type` or :t:`path` in the :t:`type specification` of a :t:`constant` or :t:`static` is inferred to be the ``'static'`` lifetime. :dp:`fls_37udexenqv3p` The :t:`lifetime` of an :t:`associated implementation constant` shall not be -:t:`elided`. +:t:`elided `. :dp:`fls_xi86he5vvill` -The :t:`lifetime` of an :t:`associated trait constant` shall not be :t:`elided`. +The :t:`lifetime` of an :t:`associated trait constant` shall not be :t:`elided `. .. rubric:: Examples @@ -3370,7 +3385,7 @@ Given :t:`static` ``S`` of the form static S: &'static [&'static usize] = &[]; :dp:`fls_f3yZ31dRuTPG` -its :t:`lifetime` :t:`elided` form is +its :t:`lifetime` :t:`elided ` form is .. code-block:: rust @@ -3388,12 +3403,12 @@ Trait Object Lifetime Elision applies to :t:`[trait object type]s`. :dp:`fls_URl9CeIVsiWs` -An :t:`elided` :t:`lifetime` of a :t:`trait object type` is inferred as follows: +An :t:`elided ` :t:`lifetime` of a :t:`trait object type` is inferred as follows: * :dp:`fls_SHhw6lYHeYyQ` If the :t:`trait object type` is used as the :t:`type specification` of a :t:`reference type`, then the :t:`lifetime` of the :t:`reference type` is the - :t:`elided` :t:`lifetime`, + :t:`elided ` :t:`lifetime`, * :dp:`fls_lC2rwdPLRwaf` If the :t:`trait object type` is used as a :t:`generic argument` and @@ -3401,7 +3416,7 @@ An :t:`elided` :t:`lifetime` of a :t:`trait object type` is inferred as follows: * :dp:`fls_e36Hh4oJvfhv` if the corresponding :t:`generic parameter` has exactly one :t:`lifetime bound`, then the :t:`lifetime` of that :t:`bound` is the - :t:`elided` :t:`lifetime`, + :t:`elided ` :t:`lifetime`, * :dp:`fls_ptejalcnIQtm` Otherwise it is a static error to infer the :t:`lifetime` :t:`bound`. @@ -3413,8 +3428,8 @@ An :t:`elided` :t:`lifetime` of a :t:`trait object type` is inferred as follows: * :dp:`fls_JhmQpUoExiNZ` If the :t:`trait` of the :t:`trait object type` has no :t:`[lifetime bound]s` - specified, then the :t:`elided` :t:`lifetime` is the ``'static`` - :t:`lifetime` unless it is :t:`elided` in :t:`[expression]s` where it is + specified, then the :t:`elided ` :t:`lifetime` is the ``'static`` + :t:`lifetime` unless it is :t:`elided ` in :t:`[expression]s` where it is instead inferred, * :dp:`fls_cglZigwAnASl` @@ -3430,7 +3445,7 @@ Given :t:`type alias` ``T`` of the form type T<'a> = &'a dyn Trait; :dp:`fls_YPesUZqYHVUX` -its :t:`lifetime` :t:`elided` form is +its :t:`lifetime` :t:`elided ` form is .. code-block:: rust @@ -3472,7 +3487,7 @@ Given an :t:`implementation` of the form impl Trait<&u8, Strukt<'_>> for &i32 {} :dp:`fls_w0vwdmO8qV9j` -its :t:`lifetime` :t:`elided` form is +its :t:`lifetime` :t:`elided ` form is .. code-block:: rust