Skip to content

Commit 0761782

Browse files
committed
Describe RPIT parameter capturing
1 parent a5d06a2 commit 0761782

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Language changes in Rust 1.79.0
8282

8383
* `Rework \`impl Trait\` lifetime inference <https://github.com/rust-lang/rust/pull/116891/>`_
8484

85-
* No change: capturing of lifestime within ``impl Trait`` types is not described in the FLS
85+
* No paragraphs: :p:`fls_Xo1ODwOyX7Vm`, :p:`fls_kTGFLFymTWch`
8686

8787
* `Change inductive trait solver cycles to be ambiguous <https://github.com/rust-lang/rust/pull/122791>`_
8888

src/types-and-traits.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,21 @@ An :t:`impl trait type` is a :t:`type` that implements a :t:`trait`, where the
11231123
An :t:`impl trait type` shall appear only within a :t:`function parameter` or
11241124
the :t:`return type` of a :t:`function`.
11251125

1126+
:dp:`fls_3aKZB0ILIkZw`
1127+
An :t:`anonymous return type` is an :t:`impl trait type` ascribed to a
1128+
:t:`function` :t:`return type`.
1129+
1130+
:dp:`fls_Xo1ODwOyX7Vm`
1131+
An :t:`anonymous return type` behaves as if it contained all declared :t:`[type
1132+
parameter]s` of the :t:`return type`'s :t:`function` and its parent :t:`trait`
1133+
or :t:`implementation`.
1134+
1135+
:dp:`fls_kTGFLFymTWch`
1136+
An :t:`anonymous return type` derived from an :t:`async function` behaves as if
1137+
it contained all declared :t:`[type parameter]s` and :t:`[lifetime parameter]s`
1138+
of the :t:`return type`'s :t:`function` and its parent :t:`trait` or
1139+
:t:`implementation`.
1140+
11261141
:dp:`fls_ECjhEI7eCwAj`
11271142
An :t:`impl trait type` shall not contain :t:`[opt-out trait bound]s`.
11281143

0 commit comments

Comments
 (0)