diff --git a/src/changelog.rst b/src/changelog.rst index 1bd0db60..da933aaf 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -18,6 +18,25 @@ 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.90.0 +------------------------------- + +- `Split up the unknown_or_malformed_diagnostic_attributes lint `_ + + - No change: lints are not part of the FLS + +- `Allow constants whose final value has references to mutable/external memory, but reject such constants as patterns `_ + + - This lifted restriction was not specified in the FLS + - The restriction on patterns is documented in :p:`fls_wJ9f906BlBvg` + - New paragraph: :p:`fls_zyuxqty09SDO` + + - Above paragraph replaces :p:`fls_6g7c1kjrmfnr` and :p:`fls_hkbwa8xx2fwx` + +- `Allow volatile access to non-Rust memory, including address 0 `_ + + - No change: lints are not part of the FLS + Language changes in Rust 1.89.0 ------------------------------- @@ -317,6 +336,10 @@ Language changes in Rust 1.83.0 * Changed paragraphs: :p:`fls_to4e7imq2c0w`, :p:`fls_6g7c1kjrmfnr`, :p:`fls_hkbwa8xx2fwx` + * New paragraph: :p:`fls_ooOYxhVh8hZo` + + * Removed paragraph: :p:`fls_ox6sgl9n43g2` + * `Allow creating references to statics in \`const\` initializers. `_ * No change: This previous restriction is not specified in the FLS diff --git a/src/expressions.rst b/src/expressions.rst index d5a1884d..b3966c2a 100644 --- a/src/expressions.rst +++ b/src/expressions.rst @@ -209,9 +209,6 @@ involve :t:`[type]s` that require :t:`destruction`: * :dp:`fls_b5fraqx07wuo` :t:`[If let expression]s`, -* :dp:`fls_6g7c1kjrmfnr` - :t:`[Immutable borrow expression]s`. - * :dp:`fls_rpapnm3afan8` :t:`[Index expression]s`, @@ -248,9 +245,6 @@ involve :t:`[type]s` that require :t:`destruction`: * :dp:`fls_3bucpdj828bq` :t:`[Range expression]s`, -* :dp:`fls_hkbwa8xx2fwx` - :t:`[Borrow]s`, - * :dp:`fls_fobs8ebt7dhc` :t:`[Struct expression]s`, @@ -271,6 +265,12 @@ involve :t:`[type]s` that require :t:`destruction`: * :dp:`fls_qvofy4wkql0s` :t:`[While loop expression]s`. +* :dp:`fls_zyuxqty09SDO` + All forms of :t:`[borrow]s` except those of expressions that are subject to + :t:`drop scope extension` to the end of the program + and which are either :t:`[mutable borrow]s` + or borrows of expressions that result in values with :t:`interior mutability`. + :dp:`fls_3i7efddbsmn0` An :t:`expression` is not considered a :t:`constant expression` when it explicitly invokes an :t:`associated trait function` or uses @@ -312,10 +312,6 @@ A :t:`constant context` is a :t:`construct` that requires a * :dp:`fls_ucFupTeCyylb` The :t:`block expression` of a :t:`const block expression`. -:dp:`fls_ox6sgl9n43g2` -It is a static error to create a :t:`mutable reference` in a -:t:`constant context`. - :dp:`fls_od0h3v40kjp6` An invocation of the :std:`core::ptr::addr_of` :t:`macro` expands to a :t:`constant expression` allowed in any :t:`constant context` and diff --git a/src/patterns.rst b/src/patterns.rst index d7b8f0f8..74674c96 100644 --- a/src/patterns.rst +++ b/src/patterns.rst @@ -370,6 +370,12 @@ When a :t:`path pattern` refers to an :t:`associated constant` or a :t:`constant`, the :t:`type` of the :t:`associated constant` or :t:`constant` shall be :t:`structurally equal`. +:dp:`fls_wJ9f906BlBvg` +When a :t:`path pattern` refers to an :t:`associated constant` or a +:t:`constant`, the :t:`constant` must not contain any references to +:t:`[mutable static]s`, :t:`[static]s` with :t:`interior mutability`, +or :t:`[external static]s`. + :dp:`fls_hF19K8sWU8FF` When the type of the :t:`path pattern` is of an :t:`enum type` or :t:`struct type`, then the :t:`enum type` or :t:`struct type` shall be subject diff --git a/src/values.rst b/src/values.rst index 68c27eb5..07bb7bfa 100644 --- a/src/values.rst +++ b/src/values.rst @@ -95,6 +95,9 @@ The :t:`type specification` of a :t:`constant` shall have ``'static`` The :t:`type` of a :t:`constant` shall implement the :std:`core::marker::Sized` :t:`trait`. +:dp:`fls_ooOYxhVh8hZo` +The type of a :t:`constant` cannot be a :t:`mutable reference type`. + :dp:`fls_ndmfqxjpvsqy` A :t:`constant initializer` is a :t:`construct` that provides the :t:`value` of its related :t:`constant`. diff --git a/version.rst b/version.rst index c2f931c7..928a28e3 100644 --- a/version.rst +++ b/version.rst @@ -1,4 +1,4 @@ .. SPDX-License-Identifier: MIT OR Apache-2.0 SPDX-FileCopyrightText: The Ferrocene Developers SPDX-FileCopyrightText: The Rust Project Developers -.. |spec_version| replace:: 1.88.0 +.. |spec_version| replace:: 1.90.0