From e2d685eeeba7bca8b11d1308dcc6225b3b1810a1 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 11:40:19 +0200 Subject: [PATCH 01/10] Update changelog for 1.81.0 --- src/changelog.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 6327b484..0a09f092 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -18,6 +18,19 @@ with the change that has been applied due to it. just the language changes that had an impact to the FLS. See the `release notes`_ for a full list of changes. +Language changes in Rust 1.81.0 +------------------------------- + +* `Abort on uncaught panics in `extern "C"` functions. `_ +* `Fix ambiguous cases of multiple `&` in elided self lifetimes. `_ +* `Stabilize `#[expect]` for lints (RFC 2383), `_ like `#[allow]` with a warning if the lint is _not_ fulfilled. +* `Change method resolution to constrain hidden types instead of rejecting method candidates. `_ +* `Bump `elided_lifetimes_in_associated_constant` to deny. `_ +* `\`offset_from\`: always allow pointers to point to the same address. `_ +* `Allow constraining opaque types during subtyping in the trait system. `_ +* `Allow constraining opaque types during various unsizing casts. `_ +* `Deny keyword lifetimes pre-expansion. `_ + Language changes in Rust 1.80.0 ------------------------------- From 1c03654ae41586cdc4e907d9af71a95b7c78826f Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 11:44:34 +0200 Subject: [PATCH 02/10] Describe `Abort on uncaught panics in `extern "C"` functions --- src/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 0a09f092..78eaa569 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -22,6 +22,9 @@ Language changes in Rust 1.81.0 ------------------------------- * `Abort on uncaught panics in `extern "C"` functions. `_ + + * No change: unwinding is not specified in the FLS + * `Fix ambiguous cases of multiple `&` in elided self lifetimes. `_ * `Stabilize `#[expect]` for lints (RFC 2383), `_ like `#[allow]` with a warning if the lint is _not_ fulfilled. * `Change method resolution to constrain hidden types instead of rejecting method candidates. `_ From 492e14b96222f43bf1b9f3089d62adeae6b74196 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 11:45:56 +0200 Subject: [PATCH 03/10] Describe Fix ambiguous cases of multiple `&` in elided self lifetimes --- src/changelog.rst | 5 +++++ src/types-and-traits.rst | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index 78eaa569..b5c294a7 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -26,6 +26,11 @@ Language changes in Rust 1.81.0 * No change: unwinding is not specified in the FLS * `Fix ambiguous cases of multiple `&` in elided self lifetimes. `_ + + * Changed paragraph: :p:`fls_crb6m6b3cdwh` + + * New paragraph: :p:`fls_d4u3y82hdadc` + * `Stabilize `#[expect]` for lints (RFC 2383), `_ like `#[allow]` with a warning if the lint is _not_ fulfilled. * `Change method resolution to constrain hidden types instead of rejecting method candidates. `_ * `Bump `elided_lifetimes_in_associated_constant` to deny. `_ diff --git a/src/types-and-traits.rst b/src/types-and-traits.rst index d4ce29f2..fa939276 100644 --- a/src/types-and-traits.rst +++ b/src/types-and-traits.rst @@ -3200,6 +3200,10 @@ An :dt:`input lifetime` is one of the following :t:`[lifetime]s`: :std:`core::ops::Fn`, :std:`core::ops::FnMut`, and :std:`core::ops::FnOnce` :t:`[trait]s`. +:dp:`fls_d4u3y82hdadc` +A :dt:`self input lifetime` is an :t:`input lifetime` of a :t:`self parameter` +that is a :t:`lifetime` of a :t:`reference type` whose referent is :c:`Self`. + * :dp:`fls_ks8wlufmhz6d` Any :t:`lifetime` related to an :t:`implementing type` and an :t:`implemented trait` of an :t:`implementation`. @@ -3231,10 +3235,10 @@ An :dt:`output lifetime` is one of the following :t:`[lifetime]s`: :t:`lifetime` is assigned to all :t:`elided` :t:`[output lifetime]s`. #. :dp:`fls_crb6m6b3cdwh` - If a :t:`function` has a :t:`self parameter` of the form ``&self``, - ``&mut self``, or ``self: T`` where ``T`` is a :t:`type` with a - :t:`lifetime`, then the :t:`lifetime` of the :t:`self parameter` is assigned - to all :t:`elided` :t:`[output lifetime]s`. + If a :t:`function` has a :t:`self parameter` with exactly 1 + :t:`self input lifetime`, then the :t:`lifetime` of the + :t:`self input lifetime` is assigned to all :t:`elided` + :t:`[output lifetime]s`. #. :dp:`fls_ac9tdlfwp5et` Otherwise this is a static error. From c8d843d377f58a8ff470a0d5c07ef118ad192944 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:01:22 +0200 Subject: [PATCH 04/10] Describe Stabilize `#[expect]` for lints (RFC 2383) --- src/attributes.rst | 3 +++ src/changelog.rst | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/attributes.rst b/src/attributes.rst index bc91fec8..80ef645b 100644 --- a/src/attributes.rst +++ b/src/attributes.rst @@ -223,6 +223,9 @@ The following :t:`[built-in attribute]s` are :dt:`[diagnostics attribute]s`: * :dp:`fls_29y8icoou1gx` :t:`Attribute` ``warn``. +* :dp:`fls_NrTL2FruARAv` + :t:`Attribute` ``expect``. + :dp:`fls_3fxhz0olhbcy` The following :t:`[built-in attribute]s` are :dt:`[documentation attribute]s`: diff --git a/src/changelog.rst b/src/changelog.rst index b5c294a7..699f05d9 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -32,6 +32,9 @@ Language changes in Rust 1.81.0 * New paragraph: :p:`fls_d4u3y82hdadc` * `Stabilize `#[expect]` for lints (RFC 2383), `_ like `#[allow]` with a warning if the lint is _not_ fulfilled. + + * New paragraph: :p:`fls_NrTL2FruARAv` + * `Change method resolution to constrain hidden types instead of rejecting method candidates. `_ * `Bump `elided_lifetimes_in_associated_constant` to deny. `_ * `\`offset_from\`: always allow pointers to point to the same address. `_ From 980cfd6627dafd4bac1b0bb3fd88d01c6ac88645 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:01:37 +0200 Subject: [PATCH 05/10] Describe Change method resolution to constrain hidden types instead of rejecting method candidates --- src/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 699f05d9..cf03cbbe 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -36,6 +36,9 @@ Language changes in Rust 1.81.0 * New paragraph: :p:`fls_NrTL2FruARAv` * `Change method resolution to constrain hidden types instead of rejecting method candidates. `_ + + * No change: the concrete type inference resolution is not part of the FLS + * `Bump `elided_lifetimes_in_associated_constant` to deny. `_ * `\`offset_from\`: always allow pointers to point to the same address. `_ * `Allow constraining opaque types during subtyping in the trait system. `_ From e92effc24ecd298f20d1ca0163a1c9e400e43e59 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:05:41 +0200 Subject: [PATCH 06/10] Describe `Bump `elided_lifetimes_in_associated_constant` to deny --- src/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index cf03cbbe..f317c80d 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -40,6 +40,9 @@ Language changes in Rust 1.81.0 * No change: the concrete type inference resolution is not part of the FLS * `Bump `elided_lifetimes_in_associated_constant` to deny. `_ + + * No change: lints are not part of the FLS + * `\`offset_from\`: always allow pointers to point to the same address. `_ * `Allow constraining opaque types during subtyping in the trait system. `_ * `Allow constraining opaque types during various unsizing casts. `_ From f8d0bfe80b98082fd32a89fe3856656e9e7795e8 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:08:52 +0200 Subject: [PATCH 07/10] Describe `\`offset_from\`: always allow pointers to point to the same address --- src/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index f317c80d..11a7864d 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -44,6 +44,9 @@ Language changes in Rust 1.81.0 * No change: lints are not part of the FLS * `\`offset_from\`: always allow pointers to point to the same address. `_ + + * No change: this previous restriction is not specified in the FLS + * `Allow constraining opaque types during subtyping in the trait system. `_ * `Allow constraining opaque types during various unsizing casts. `_ * `Deny keyword lifetimes pre-expansion. `_ From 23343b86e1300d8cd959917b9558386602bb99b7 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:09:42 +0200 Subject: [PATCH 08/10] Describe `Allow constraining opaque types during subtyping in the trait system --- src/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 11a7864d..3fe295f5 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -48,6 +48,9 @@ Language changes in Rust 1.81.0 * No change: this previous restriction is not specified in the FLS * `Allow constraining opaque types during subtyping in the trait system. `_ + + * No change: the concrete type inference resolution is not part of the FLS + * `Allow constraining opaque types during various unsizing casts. `_ * `Deny keyword lifetimes pre-expansion. `_ From a9678424f79cab769fdb2c895fe2f4014fa22d09 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:11:52 +0200 Subject: [PATCH 09/10] Describe `Allow constraining opaque types during various unsizing casts --- src/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 3fe295f5..2917996f 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -52,6 +52,9 @@ Language changes in Rust 1.81.0 * No change: the concrete type inference resolution is not part of the FLS * `Allow constraining opaque types during various unsizing casts. `_ + + * No change: the concrete type inference resolution is not part of the FLS + * `Deny keyword lifetimes pre-expansion. `_ Language changes in Rust 1.80.0 From c512ac1e69f25b2a5ca4cccf00ef2b9ecb689b08 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 9 Sep 2024 12:14:21 +0200 Subject: [PATCH 10/10] Describe `Deny keyword lifetimes pre-expansion --- src/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/changelog.rst b/src/changelog.rst index 2917996f..5e92d7db 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -57,6 +57,8 @@ Language changes in Rust 1.81.0 * `Deny keyword lifetimes pre-expansion. `_ + * No change: the FLS already specifies this restriction in :s:`Lifetime` + Language changes in Rust 1.80.0 -------------------------------