Skip to content

Commit eb7a1a6

Browse files
committed
Describe 1.85 changes
1 parent 4fa66dc commit eb7a1a6

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

src/changelog.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,31 @@ with the change that has been applied due to it.
1818
just the language changes that had an impact to the FLS. See the `release
1919
notes`_ for a full list of changes.
2020

21+
Language changes in Rust 1.85.0
22+
-------------------------------
23+
24+
* `The 2024 Edition is now stable. <https://github.com/rust-lang/rust/pull/133349>`_
25+
26+
* No change: The FLS currently qualifies only the 2021 Edition
27+
28+
* `Stabilize async closures <https://github.com/rust-lang/rust/pull/132706>`_
29+
30+
* New paragraphs: :p:`fls_My6pMgpeFCFg`, :p:`fls_DSy7bPKGzyov`
31+
32+
* Changed syntax: :s:`ClosureExpression`
33+
34+
* `Stabilize \`#[diagnostic::do_not_recommend]\` <https://github.com/rust-lang/rust/pull/132056>`_
35+
36+
* No change: tool attributes are not part of the FLS
37+
38+
* `Add \`unpredictable_function_pointer_comparisons\` lint to warn against function pointer comparisons <https://github.com/rust-lang/rust/pull/118833>`_
39+
40+
* No change: Lints are not part of the FLS
41+
42+
* `Lint on combining \`#[no_mangle]\` and \`#[export_name]\` attributes. <https://github.com/rust-lang/rust/pull/131558>`_
43+
44+
* No change: Lints are not part of the FLS
45+
2146
Language changes in Rust 1.84.0
2247
-------------------------------
2348

src/expressions.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3697,7 +3697,7 @@ Closure Expressions
36973697
.. syntax::
36983698

36993699
ClosureExpression ::=
3700-
$$move$$? $$|$$ ClosureParameterList? $$|$$
3700+
$$async$$? $$move$$? $$|$$ ClosureParameterList? $$|$$
37013701
(ClosureBody | ClosureBodyWithReturnType)
37023702

37033703
ClosureBody ::=
@@ -3721,6 +3721,9 @@ Closure Expressions
37213721
A :t:`closure expression` is an :t:`expression` that defines a
37223722
:t:`closure type` and constructs a value of that :t:`type`.
37233723

3724+
:dp:`fls_My6pMgpeFCFg`
3725+
An :t:`async closure expression` is a :t:`closure expression` subject to keyword ``async`` that defines an :t:`async closure type` and constructs a value of that :t:`type`.
3726+
37243727
:dp:`fls_UgJgur0z6d4a`
37253728
The :t:`return type` of a :t:`closure type` is determined as follows:
37263729

@@ -3730,6 +3733,9 @@ The :t:`return type` of a :t:`closure type` is determined as follows:
37303733
* :dp:`fls_wLVeE6cNG8oa`
37313734
Otherwise the :t:`return type` is the :t:`type` of the :t:`closure body`.
37323735

3736+
:dp:`fls_DSy7bPKGzyov`
3737+
The :t:`return type` of an :t:`async closure type` is an :t:`anonymous return type` with a :std:`core::future::Future` :t:`trait bound` and a :t:`binding argument` for the ``Output`` :t:`associated type alias` with the actual :t:`return type` of the corresponding :t:`closure type`.
3738+
37333739
:dp:`fls_srbl7ptknjyk`
37343740
A :t:`closure body` is a :t:`construct` that represents the executable portion
37353741
of a :t:`closure expression`.

src/glossary.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,27 @@ an asynchronous manner.
539539
:dp:`fls_je689rormhd6`
540540
See :s:`AsyncBlockExpression`.
541541

542+
.. _fls_oUdQnbW1MAFW:
543+
544+
async closure expression
545+
^^^^^^^^^^^^^^^^^^^^^^^^
546+
547+
:dp:`fls_SxydbQPPX9Jw`
548+
An :dt:`async closure expression` is a :t:`closure expression` subject to keyword ``async`` that defines an :t:`async closure type` and constructs a value of that :t:`type`.
549+
550+
:dp:`fls_JZsDFMg85a3u`
551+
See :s:`ClosureExpression`.
552+
553+
.. _fls_Pq4ohvrMOi5p:
554+
555+
async closure type
556+
^^^^^^^^^^^^^^^^^^
557+
558+
:dp:`fls_IT28HJaF8rnm`
559+
An :dt:`async closure type` is a unique anonymous :t:`function type` that encapsulates
560+
all :t:`[capture target]s` of a :t:`closure expression` producing a :std:`core::future::Future`.
561+
562+
542563
.. _fls_lYrTaCM1LcXU:
543564

544565
async control flow boundary

0 commit comments

Comments
 (0)