Skip to content

Commit 65b75c3

Browse files
Merge #525
525: Fix dead references in patterns.rst r=Hoverbear a=Veykril Co-authored-by: Lukas Wirth <lukas.wirth@ferrous-systems.com>
2 parents 6163546 + 5ea77b6 commit 65b75c3

File tree

2 files changed

+38
-13
lines changed

2 files changed

+38
-13
lines changed

src/glossary.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,6 +2087,18 @@ evaluation
20872087
:dt:`Evaluation` is the process by which an :t:`expression` achieves its
20882088
runtime effects.
20892089

2090+
.. _fls_EJSzYb4IxvtR:
2091+
2092+
exclusive range pattern
2093+
^^^^^^^^^^^^^^^^^^^^^^^
2094+
2095+
:dp:`fls_qxsV6ZxFfDHm`
2096+
An :dt:`exclusive range pattern` is a :t:`range pattern` with both a
2097+
:t:`range pattern low bound` and a :t:`range pattern high bound`.
2098+
2099+
:dp:`fls_kHIWYUPhxikM`
2100+
See :s:`ExclusiveRangePattern`.
2101+
20902102
.. _fls_nw0eg7gwayrg:
20912103

20922104
executed

src/patterns.rst

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ The :t:`type` of a :t:`literal pattern` is the :t:`type` of the specified
281281
.. rubric:: Examples
282282

283283
:dp:`fls_fqclaznjgtb1`
284-
Two literal patterns in the context of a match expression. See :p:`5.1.1.
285-
<fls_yeajwokikkdi>` for the declaration of ``x``.
284+
Two literal patterns in the context of a match expression.
285+
See :p:`fls_sfyfdxhvhk44` for the declaration of ``x``.
286286

287287
.. code-block:: rust
288288
@@ -321,7 +321,7 @@ The :t:`type` of a :t:`parenthesized pattern` is the :t:`type` of its nested
321321
.. rubric:: Examples
322322

323323
:dp:`fls_2xq8852gihn9`
324-
See :p:`5.1.1. <fls_yeajwokikkdi>` for the declaration of ``x``.
324+
See :p:`fls_sfyfdxhvhk44` for the declaration of ``x``.
325325

326326
.. code-block:: rust
327327
@@ -411,7 +411,7 @@ The :t:`type` of a :t:`path pattern` is the :t:`type` of the :t:`constant`,
411411
enum Enum { Variant }
412412
413413
:dp:`fls_u59rilepu8z9`
414-
See :p:`5.1.1. <fls_yeajwokikkdi>` for the declaration of ``x``.
414+
See :p:`fls_sfyfdxhvhk44` for the declaration of ``x``.
415415

416416
.. code-block:: rust
417417
@@ -504,7 +504,7 @@ less than or equal to its :t:`range pattern high bound`.
504504

505505
:dp:`fls_8bdOqkO1NuJW`
506506
The :t:`range pattern low bound` of an :t:`exclusive range pattern` shall be
507-
less than to its :t:`range pattern high bound`.
507+
less than its :t:`range pattern high bound`.
508508

509509
:dp:`fls_s2b5n4snc4d7`
510510
An :t:`obsolete range pattern` is equivalent to an :t:`inclusive range pattern`.
@@ -540,8 +540,8 @@ A :t:`qualified path expression` of a :t:`range pattern` shall refer to an
540540
.. rubric:: Examples
541541

542542
:dp:`fls_3wwpq8i6mo2a`
543-
Two range patterns in the context of a match expression. See :p:`5.1.1.
544-
<fls_yeajwokikkdi>` for the declaration of ``x``.
543+
Two range patterns in the context of a match expression.
544+
See :p:`fls_sfyfdxhvhk44` for the declaration of ``x``.
545545

546546
.. code-block:: rust
547547
@@ -590,8 +590,8 @@ The :t:`type` of a :t:`reference pattern` is determined as follows:
590590
.. rubric:: Examples
591591

592592
:dp:`fls_mpeuhov0umfa`
593-
A reference pattern in the context of a match expression. See :p:`5.1.3.
594-
<fls_yowuqu7bcu7b>` for the declaration of ``ref_x``.
593+
A reference pattern in the context of a match expression.
594+
See :p:`fls_2xq8852gihn9` for the declaration of ``ref_x``.
595595

596596
.. code-block:: rust
597597
@@ -750,7 +750,7 @@ A :t:`struct pattern` is an :t:`irrefutable pattern` if
750750
All of its :t:`[subpattern]s` are :t:`[irrefutable pattern]s`, and
751751

752752
* :dp:`fls_p4OplpUvS04l`
753-
The :t:`deconstructree` is either:
753+
The :t:`deconstructee` is either:
754754

755755
* :dp:`fls_pre3YwAv01FE`
756756
A :t:`struct type` or a :t:`union type`, or
@@ -943,6 +943,9 @@ a :t:`union type` when the :t:`field` contains data that is invalid for the
943943

944944
.. rubric:: Examples
945945

946+
:dp:`fls_zRCiKnhQebyp`
947+
A record struct pattern deconstructing a record struct.
948+
946949
.. code-block:: rust
947950
948951
struct RecordStruct {
@@ -958,6 +961,11 @@ a :t:`union type` when the :t:`field` contains data that is invalid for the
958961
RecordStruct { .. } => (),
959962
}
960963
964+
:dp:`fls_D5tAGzrjXFTu`
965+
A record struct pattern deconstructing a tuple struct.
966+
967+
.. code-block:: rust
968+
961969
struct TupleStruct (
962970
u32,
963971
u32,
@@ -971,6 +979,11 @@ a :t:`union type` when the :t:`field` contains data that is invalid for the
971979
TupleStruct { .. } => (),
972980
}
973981
982+
:dp:`fls_FhvMzLPRlY7p`
983+
A record struct pattern deconstructing a union.
984+
985+
.. code-block:: rust
986+
974987
union Union {
975988
first : u32,
976989
second: u32,
@@ -1055,7 +1068,7 @@ A :s:`RecordStructRestPattern` is allowed even if all :t:`[field]s` of the
10551068
.. rubric:: Examples
10561069

10571070
:dp:`fls_2u99arsbnlnk`
1058-
See :p:`5.1.9.1. <fls_nruvg0es3kx7>` for the declarations of ``TupleStruct`` and
1071+
See :p:`fls_D5tAGzrjXFTu` for the declarations of ``TupleStruct`` and
10591072
``tuple_struct_value``.
10601073

10611074
.. code-block:: rust
@@ -1175,8 +1188,8 @@ it matches.
11751188
.. rubric:: Examples
11761189

11771190
:dp:`fls_j3u6x1ensrbe`
1178-
An underscore pattern in the context of a let statement. See :p:`5.1.10.
1179-
<fls_fo48m62q2y0v>` for the declaration of ``pair``.
1191+
An underscore pattern in the context of a let statement.
1192+
See :p:`fls_8r81vtv5hnrd` for the declaration of ``pair``.
11801193

11811194
.. code-block:: rust
11821195

0 commit comments

Comments
 (0)