Skip to content

Commit aa8a067

Browse files
committed
ensure main text has all glossary entries (part 3)
Also, replace duplicated terms regarding to lifetimes
1 parent 9272157 commit aa8a067

5 files changed

Lines changed: 32 additions & 35 deletions

File tree

src/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ FLS maintenance
5757
- :p:`fls_9d970yfwmj2d`
5858
- :p:`fls_p9687v3xckps`
5959
- :p:`fls_8j408kckzzud`
60+
- :p:`fls_mdejdc0nNgyO`
61+
- :p:`fls_WUCvCauUCmsD`
62+
- :p:`fls_5SVthCNZBcVS`
63+
- :p:`fls_SonodAQVL5J4`
6064

6165
Language changes in Rust 1.94.0
6266
-------------------------------

src/generics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ of the :t:`type parameter`.
463463
Any remaining :t:`[generic parameter]s` without corresponding conformant
464464
:t:`[generic argument]s` are :t:`[constant parameter]s` with
465465
:t:`[constant parameter initializer]s`, :t:`[lifetime parameter]s` with
466-
either inferred :t:`[lifetime argument]s` or :t:`[elided lifetime]s`,
466+
either inferred :t:`[lifetime argument]s` or :t:`elided lifetimes <lifetime elision>`,
467467
:t:`[type parameter]s` with :t:`[type parameter initializer]s` or inferred
468468
:t:`[type argument]s`, and
469469

src/glossary.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,18 +1242,6 @@ a :t:`slice type`.
12421242

12431243
See :s:`ElementType`.
12441244

1245-
elided
1246-
^^^^^^
1247-
1248-
For :dt:`elided`, see :t:`elided lifetime`.
1249-
1250-
elided lifetime
1251-
^^^^^^^^^^^^^^^
1252-
1253-
An :dt:`elided lifetime` is either an :t:`unnamed lifetime` or a :t:`lifetime`
1254-
that has been explicitly omitted from a :t:`function signature` or an
1255-
:t:`implementation`.
1256-
12571245
else expression
12581246
^^^^^^^^^^^^^^^
12591247

@@ -4745,12 +4733,6 @@ unnamed constant
47454733
An :dt:`unnamed constant` is a :t:`constant` declared with character 0x5F (low
47464734
line).
47474735

4748-
unnamed lifetime
4749-
^^^^^^^^^^^^^^^^
4750-
4751-
An :dt:`unnamed lifetime` is a :t:`lifetime` declared with character 0x5F (low
4752-
line).
4753-
47544736
unqualified path expression
47554737
^^^^^^^^^^^^^^^^^^^^^^^^^^^
47564738

src/lexical-elements.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,12 @@ A :t:`block comment` is a :t:`comment` that spans one or more :t:`[line]s`.
13321332
:dp:`fls_nayisy85kyq2`
13331333
A :t:`line comment` is a :t:`comment` that spans exactly one :t:`line`.
13341334

1335+
:dp:`fls_5SVthCNZBcVS`
1336+
A :dt:`syntactic category` is a nonterminal in the Backus-Naur Form grammar definition of the Rust programming language.
1337+
1338+
:dp:`fls_SonodAQVL5J4`
1339+
A :dt:`construct` is a piece of program text that is an instance of a :t:`syntactic category`.
1340+
13351341
:dp:`fls_k3hj30hjkdhw`
13361342
An :t:`inner block doc` is a :t:`block comment` that applies to an enclosing
13371343
:t:`non-[comment]` :t:`construct`.
@@ -1560,4 +1566,3 @@ Word ``union`` acts as a :t:`keyword` only when used in the context of a
15601566

15611567
:dp:`fls_g0JEluWqBpNc`
15621568
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`.
1563-

src/types-and-traits.rst

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,12 @@ Struct Types
767767
A :t:`struct type` is an :t:`abstract data type` that is a product of other
768768
:t:`[type]s`.
769769

770+
:dp:`fls_mdejdc0nNgyO`
771+
A :dt:`record struct type` is the :t:`type` of a :t:`record struct`.
772+
773+
:dp:`fls_WUCvCauUCmsD`
774+
A :dt:`record struct field` is a :t:`field` of a :t:`record struct type`.
775+
770776
:dp:`fls_r885av95eivp`
771777
The :t:`name` of a :t:`record struct field` shall be unique within the
772778
related :s:`RecordStructDeclaration`.
@@ -3314,17 +3320,17 @@ An :dt:`output lifetime` is one of the following :t:`[lifetime]s`:
33143320
:t:`Lifetime elision` proceeds as follows:
33153321

33163322
#. :dp:`fls_1j204m1wy333`
3317-
Each :t:`elided` :t:`input lifetime` is a distinct :t:`lifetime parameter` in
3323+
Each :t:`elided <lifetime elision>` :t:`input lifetime` is a distinct :t:`lifetime parameter` in
33183324
its related :t:`construct`.
33193325

33203326
#. :dp:`fls_6km3cbchuxr2`
33213327
If a :t:`construct` has exactly one :t:`input lifetime`, then that
3322-
:t:`lifetime` is assigned to all :t:`elided` :t:`[output lifetime]s`.
3328+
:t:`lifetime` is assigned to all :t:`elided <lifetime elision>` :t:`[output lifetime]s`.
33233329

33243330
#. :dp:`fls_crb6m6b3cdwh`
33253331
If a :t:`function` has a :t:`self parameter` with exactly 1
33263332
:t:`self input lifetime`, then the :t:`lifetime` of the
3327-
:t:`self input lifetime` is assigned to all :t:`elided`
3333+
:t:`self input lifetime` is assigned to all :t:`elided <lifetime elision>`
33283334
:t:`[output lifetime]s`.
33293335

33303336
#. :dp:`fls_ac9tdlfwp5et`
@@ -3340,7 +3346,7 @@ Given :t:`function` ``f`` of the form
33403346
fn f <'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command;
33413347
33423348
:dp:`fls_vcmmkp9uruhr`
3343-
its :t:`lifetime` :t:`elided` form is
3349+
its :t:`lifetime` :t:`elided <lifetime elision>` form is
33443350

33453351
.. code-block:: rust
33463352
@@ -3358,16 +3364,16 @@ Static Lifetime Elision
33583364
the :t:`type ascription` of :t:`[constant]s` and :t:`[static]s`.
33593365

33603366
:dp:`fls_8irr97rZWfSC`
3361-
An :t:`elided` :t:`lifetime` of a :t:`reference type` or :t:`path` in the
3367+
An :t:`elided <lifetime elision>` :t:`lifetime` of a :t:`reference type` or :t:`path` in the
33623368
:t:`type specification` of a :t:`constant` or :t:`static` is inferred to be the
33633369
``'static'`` lifetime.
33643370

33653371
:dp:`fls_37udexenqv3p`
33663372
The :t:`lifetime` of an :t:`associated implementation constant` shall not be
3367-
:t:`elided`.
3373+
:t:`elided <lifetime elision>`.
33683374

33693375
:dp:`fls_xi86he5vvill`
3370-
The :t:`lifetime` of an :t:`associated trait constant` shall not be :t:`elided`.
3376+
The :t:`lifetime` of an :t:`associated trait constant` shall not be :t:`elided <lifetime elision>`.
33713377

33723378
.. rubric:: Examples
33733379

@@ -3379,7 +3385,7 @@ Given :t:`static` ``S`` of the form
33793385
static S: &'static [&'static usize] = &[];
33803386
33813387
:dp:`fls_f3yZ31dRuTPG`
3382-
its :t:`lifetime` :t:`elided` form is
3388+
its :t:`lifetime` :t:`elided <lifetime elision>` form is
33833389

33843390
.. code-block:: rust
33853391
@@ -3397,20 +3403,20 @@ Trait Object Lifetime Elision
33973403
applies to :t:`[trait object type]s`.
33983404

33993405
:dp:`fls_URl9CeIVsiWs`
3400-
An :t:`elided` :t:`lifetime` of a :t:`trait object type` is inferred as follows:
3406+
An :t:`elided <lifetime elision>` :t:`lifetime` of a :t:`trait object type` is inferred as follows:
34013407

34023408
* :dp:`fls_SHhw6lYHeYyQ`
34033409
If the :t:`trait object type` is used as the :t:`type specification` of a
34043410
:t:`reference type`, then the :t:`lifetime` of the :t:`reference type` is the
3405-
:t:`elided` :t:`lifetime`,
3411+
:t:`elided <lifetime elision>` :t:`lifetime`,
34063412

34073413
* :dp:`fls_lC2rwdPLRwaf`
34083414
If the :t:`trait object type` is used as a :t:`generic argument` and
34093415

34103416
* :dp:`fls_e36Hh4oJvfhv`
34113417
if the corresponding :t:`generic parameter` has exactly one
34123418
:t:`lifetime bound`, then the :t:`lifetime` of that :t:`bound` is the
3413-
:t:`elided` :t:`lifetime`,
3419+
:t:`elided <lifetime elision>` :t:`lifetime`,
34143420

34153421
* :dp:`fls_ptejalcnIQtm`
34163422
Otherwise it is a static error to infer the :t:`lifetime` :t:`bound`.
@@ -3422,8 +3428,8 @@ An :t:`elided` :t:`lifetime` of a :t:`trait object type` is inferred as follows:
34223428

34233429
* :dp:`fls_JhmQpUoExiNZ`
34243430
If the :t:`trait` of the :t:`trait object type` has no :t:`[lifetime bound]s`
3425-
specified, then the :t:`elided` :t:`lifetime` is the ``'static``
3426-
:t:`lifetime` unless it is :t:`elided` in :t:`[expression]s` where it is
3431+
specified, then the :t:`elided <lifetime elision>` :t:`lifetime` is the ``'static``
3432+
:t:`lifetime` unless it is :t:`elided <lifetime elision>` in :t:`[expression]s` where it is
34273433
instead inferred,
34283434

34293435
* :dp:`fls_cglZigwAnASl`
@@ -3439,7 +3445,7 @@ Given :t:`type alias` ``T`` of the form
34393445
type T<'a> = &'a dyn Trait;
34403446
34413447
:dp:`fls_YPesUZqYHVUX`
3442-
its :t:`lifetime` :t:`elided` form is
3448+
its :t:`lifetime` :t:`elided <lifetime elision>` form is
34433449

34443450
.. code-block:: rust
34453451
@@ -3481,7 +3487,7 @@ Given an :t:`implementation` of the form
34813487
impl Trait<&u8, Strukt<'_>> for &i32 {}
34823488
34833489
:dp:`fls_w0vwdmO8qV9j`
3484-
its :t:`lifetime` :t:`elided` form is
3490+
its :t:`lifetime` :t:`elided <lifetime elision>` form is
34853491

34863492
.. code-block:: rust
34873493

0 commit comments

Comments
 (0)