Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Aug 8, 2023
1 parent 171cfda commit e8ca196
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ location. The following :t:`[expression]s` are :t:`[place expression]s`:
* :dp:`fls_ya05djl1d154`
:t:`[Path expression]s` that resolve to a :t:`static` or a :t:`variable`.

* :dp:`fls_gv4M0DE3OMwk`
A :t:`temporary`.

:dp:`fls_ku38h562vfyl`
A :t:`mutable place expression` is a :t:`place expression` whose memory
location can be modified. The following :t:`[place expression]s` are
Expand All @@ -437,6 +440,10 @@ location can be modified. The following :t:`[place expression]s` are
An :t:`index expression` whose :t:`type` implements the
:std:`core::ops::IndexMut` :t:`trait`,

* :dp:`fls_Sgfxp186GMvz`
:t:`[Parenthesized expression]s` where the :t:`operand` is a
:t:`mutable place expression`,

* :dp:`fls_ilaqmj3hc5uv`
A :t:`path expression` that resolves to a :t:`mutable static`,

Expand Down
7 changes: 4 additions & 3 deletions src/generics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ 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:

* :dp:`fls_sseo6u6pbcki`
As a :t:`binding argument` in the :t:`[bound]s` of a :t:`type` that contains
another :t:`generic parameter` that constrains the :t:`implementation`, or
As a :t:`binding argument` in the :t:`[trait bound]s` of a :t:`type` that
contains another :t:`generic parameter` that constrains the
:t:`implementation`, or

* :dp:`fls_62b59qvom3nm`
The :t:`implemented trait`, or
Expand Down Expand Up @@ -261,7 +262,7 @@ Where Clauses

:dp:`fls_3nqb7p5ifvio`
A :t:`where clause` is a :t:`construct` that specifies :t:`[bound]s` on
:t:`[lifetime parameter]s`, :t:`[type parameter]s`, and :t:`[type]s` that have
:t:`[lifetime parameter]s` and :t:`[type]s` that have
to hold for the :t:`construct` subject to the :t:`where clause` to be valid.

:dp:`fls_fhy4rsmmbvyy`
Expand Down
9 changes: 9 additions & 0 deletions src/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6941,6 +6941,15 @@ default :t:`value` of its related :t:`type parameter`.
:dp:`fls_6Ap26AcSadP8`
See :s:`TypeParameterInitializer`.

.. _fls_HghjWqvyj5bN:

type parameter
^^^^^^^^^^^^^^

:dp:`fls_EuHHxwHd0RHV`
A :dt:`type parameter type` is a placeholder :t:`type` of a :t:`type parameter`
to be substituted by :t:`generic substitution`.

.. _fls_QDCiXh7uSj9r:

type path
Expand Down
17 changes: 17 additions & 0 deletions src/types-and-traits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,23 @@ An :t:`inferred type` forces a tool to deduce a :t:`type`, if possible.
let values: Vec<_> = (0 .. 10).collect();
.. _fls_XJCXBAJHzP3D:

Type Parameters
~~~~~~~~~~~~~~~

.. rubric:: Legality Rules

:dp:`fls_dCIIVXGhXDlO`
A :t:`type parameter type` is a placeholder :t:`type` of a :t:`type parameter`
to be substituted by :t:`generic substitution`.

.. rubric:: Examples

.. code-block:: rust
fn type_parameter<T>(parameter: T) {}
.. _fls_98lnexk53ru4:

Never Type
Expand Down

0 comments on commit e8ca196

Please sign in to comment.