Note
The contents of this page are informational.
D. FLS Changelog¶
This page describes the changes that have been applied to the FLS itself to address changes and new features introduced in each Rust release. Every item listed in the “Language” section of the release note is reproduced here, along with the change that has been applied due to it.
Caution
This page is not an exhaustive list of all of the changes in a release, just the language changes that had an impact to the FLS. See the release notes for a full list of changes.
D.1. Language changes in Rust 1.83.0¶
Stabilize `&mut`, `*mut`, `&Cell`, and `*const Cell` in const.
Allow creating references to statics in `const` initializers.
No change: This previous restriction is not specified in the FLS
Implement raw lifetimes and labels (`’r#ident`).
Changed syntax:
Lifetime
Define behavior when atomic and non-atomic reads race.
No change: Already covered by the definition of data race.
Disallow implicit coercions from places of type `!`
No change: The FLS does not specify type inference to such a degree
`const extern` functions can now be defined for other calling conventions.
No change: This previous restriction is not specified in the FLS
Stabilize `expr_2021` macro fragment specifier in all editions.
Changed syntax:
MacroFragmentSpecifier
Changed paragraphs: 20.4.1.2:6, 20.1.1:6
The `non_local_definitions` lint now fires on less code and warns by default.
No change: Lints are not part of the FLS
D.2. Language changes in Rust 1.82.0¶
Don’t make statement nonterminals match pattern nonterminals
No change: Exact parsing behavior of non-terminals within declarative macros is not specified
Patterns matching empty types can now be omitted in common cases
Enforce supertrait outlives obligations when using trait impls
No change: the concrete type inference resolution is not part of the FLS
-
No change: addr_of is not specified as it is a library defined macro, &raw (const|mut) appears as a new feature separately below
size_of_val_raw: for length 0 this is safe to call
No change: size_of_val_raw is a library defined function
Reorder trait bound modifiers *after* `for<…>` binder in trait bounds
Changed syntax:
TraitBound
Stabilize opaque type precise capturing (RFC 3617)
Changed syntax:
ImplTraitTypeSpecification
,ImplTraitTypeSpecificationOneBound
New syntax:
UseCaptures
,UseCapturesGenericArgs
,UseCapturesGenericArg
Stabilize `&raw const` and `&raw mut` operators (RFC 2582)
New section: Raw Borrow Expression
New paragraphs: 6.1.4:23
Stabilize unsafe extern blocks (RFC 3484)
New syntax:
ItemSafety
Changed syntax:
WeakKeyword
,FunctionQualifierList
,StaticDeclaration
Removed paragraph Paragraph fls_iaimuqcclstl
Stabilize nested field access in `offset_of!`
No change: offset_of is a library defined macro
Do not require `T` to be live when dropping `[T; 0]`
No change: The drop interaction with the borrow checker is not specified as the borrow checker is not specified in the FLS
Stabilize `const` operands in inline assembly
Note: These changes affect content that is informational.
New syntax:
ConstRegisterExpression
Stabilize floating-point arithmetic in `const fn`
New paragraph: 6.5:2
Removed paragraph: Paragraph fls_9mrrosm8jnn7
Stabilize explicit opt-in to unsafe attributes
New section: Attribute unsafe
Document NaN bit patterns guarantees
New paragraph: 4.3.3.1:3
D.3. 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.
Changed paragraph: 4.14.3.1:15
New paragraph: 4.14.3.1:6
-
New paragraph: 13.2:21
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.
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.
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.
No change: the FLS already specifies this restriction in
Lifetime
D.4. Language changes in Rust 1.80.0¶
Allow zero-byte offsets and ZST read/writes on arbitrary pointers
No change: this previous restriction is not specified in the FLS
Support C23’s variadics without a named parameter
No change: this previous restriction is not specified in the FLS
Stabilize `exclusive_range_pattern` feature
Changed syntax:
RangePattern
New syntax:
ExclusiveRangePattern
Changed paragraph: 5.1.5:16
D.5. Language changes in Rust 1.79.0¶
Stabilize inline `const {}` expressions.
New section: Const Blocks
Prevent opaque types being instantiated twice with different regions within the same function.
No change: already described in 4.12.2:51
Stabilize WebAssembly target features that are in phase 4 and 5.
No change:
cfg
andcfg_attr
configuration predicates are not part of the FLS
Add the `redundant_lifetimes` lint to detect lifetimes which are semantically redundant.
No change: lints are not part of the FLS
Stabilize the `unnameable_types` lint for public types that can’t be named.
No change: lints are not part of the FLS
Enable debuginfo in macros, and stabilize `-C collapse-macro-debuginfo` and `#[collapse_debuginfo]`.
New section: Attribute collapse_debuginfo
Propagate temporary lifetime extension into `if` and `match` expressions.
Restrict promotion of `const fn` calls.
No change: already described in 7.4.1:6
Warn against refining impls of crate-private traits with `refining_impl_trait` lint.
No change: lints are not part of the FLS
Stabilize associated type bounds (RFC 2289).
New paragraph: 12.3:5
Stabilize importing `main` from other modules or crates.
No change: this lifted restriction was not previously described in the FLS
While updating the FLS to account for this feature, we realized that the way the FLS described crate types was incorrect. We rectified this:
New section: Program Entry Point
New glossary entry: crate type
Updated glossary entries: binary crate, library crate, proc-macro crate
Moved paragraph: 18.7:2
Check return types of function types for well-formedness
No change: the exact trait resolution implementation is not part of the FLS
Change inductive trait solver cycles to be ambiguous
No change: the exact trait solver is not part of the FLS
D.6. Language changes in Rust 1.78.0¶
Stabilize `#[cfg(target_abi = …)]`
No change:
cfg
andcfg_attr
configuration predicates are not part of the FLS
Stabilize the `#[diagnostic]` namespace and `#[diagnostic::on_unimplemented]` attribute
No change: tool attributes are not part of the FLS
Make async-fn-in-trait implementable with concrete signatures
No change: no paragraph in the FLS forbids this prior incompatability
Make matching on NaN a hard error, and remove the rest of `illegal_floating_point_literal_pattern`
New paragraph: 5.1.2:3
static mut: allow mutable reference to arbitrary types, not just slices and arrays
No change: this lifted restriction was not previously described in the FLS
Extend `invalid_reference_casting` to include references casting to bigger memory layout
No change: lints are not part of the FLS
Add `non_contiguous_range_endpoints` lint for singleton gaps after exclusive ranges
No change: lints are not part of the FLS
Add `wasm_c_abi` lint for use of older wasm-bindgen versions
No change: lints are not part of the FLS
Update `indirect_structural_match` and `pointer_structural_match` lints to match RFC
No change: lints are not part of the FLS
Make non-`PartialEq`-typed consts as patterns a hard error
No change: already described in 5.1.4:4
Split `refining_impl_trait` lint into `_reachable`, `_internal` variants
No change: lints are not part of the FLS
Remove unnecessary type inference when using associated types inside of higher ranked `where`-bounds
No change: the FLS does not specify type inference to such a degree
Weaken eager detection of cyclic types during type inference
No change: the FLS does not specify type inference to such a degree
`trait Trait: Auto {}`: allow upcasting from `dyn Trait` to `dyn Trait + Auto`
New paragraph: 4.12.3:29
D.7. language changes in Rust 1.77.0¶
Reveal opaque types within the defining body for exhaustiveness checking.
No change: the FLS does not specify introspection of the concrete type of the match expression scrutinee to such a degree
-
New section: C String Literals
-
No change: not a language change
Add lint `static_mut_refs` to warn on references to mutable statics.
No change: lints are not part of the FLS
Support async recursive calls (as long as they have indirection).
No change: this lifted restriction was not previously described in the FLS
Undeprecate lint `unstable_features` and make use of it in the compiler.
No change: lints are not part of the FLS
Make inductive cycles in coherence ambiguous always.
No change: the FLS does not describe the trait solver to such a degree
Get rid of type-driven traversal in const-eval interning, only as a future compatibility lint for now.
No change: this lifted restriction was not previously described in the FLS
Deny braced macro invocations in let-else.
New paragraph: 8.1:4