From 8ab93f95820560aba59d4db1e450a71e0471950f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 24 Jun 2025 18:59:37 -0700 Subject: [PATCH 01/10] Announcing Rust 1.88.0 --- content/Rust-1.88.0.md | 109 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 content/Rust-1.88.0.md diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md new file mode 100644 index 000000000..bf64a6b1f --- /dev/null +++ b/content/Rust-1.88.0.md @@ -0,0 +1,109 @@ ++++ +path = "2025/06/26/Rust-1.88.0" +title = "Announcing Rust 1.88.0" +authors = ["The Rust Release Team"] +aliases = ["releases/1.88.0"] + +[extra] +release = true ++++ + +The Rust team is happy to announce a new version of Rust, 1.88.0. Rust is a programming language empowering everyone to build reliable and efficient software. + +If you have a previous version of Rust installed via `rustup`, you can get 1.88.0 with: + +``` +$ rustup update stable +``` + +If you don't have it already, you can [get `rustup`](https://www.rust-lang.org/install.html) from the appropriate page on our website, and check out the [detailed release notes for 1.88.0](https://doc.rust-lang.org/stable/releases.html#version-1880-2025-06-26). + +If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please [report](https://github.com/rust-lang/rust/issues/new/choose) any bugs you might come across! + +## What's in 1.88.0 stable + +### Cargo automatic cache cleaning + +Starting in 1.88.0, Cargo will automatically run garbage collection on the cache in its home directory! + +When building, Cargo downloads and caches crates needed as dependencies. Historically, these downloaded files would never be cleaned up, leading to an unbounded amount of disk usage in Cargo's home directory. In this version, Cargo introduces a garbage collection mechanism to automatically clean up old files (e.g. `.crate` files). Cargo will remove files downloaded from the network if not accessed in 3 months, and files obtained from the local system if not accessed in 1 month. Note that this automatic garbage collection will not take place if running offline (using `--offline` or `--frozen`). + +Cargo 1.78 and newer track the access information needed for this garbage collection. This was introduced well before the actual cleanup that's starting now, in order to reduce cache churn for those that still use prior versions. If you regularly use versions of Cargo even older than 1.78, in addition to running current versions of Cargo, and you expect to have some crates accessed exclusively by the older versions of Cargo and don't want to re-download those crates every ~3 months, you may wish to set `cache.auto-clean-frequency = "never"` in the Cargo configuration, as described in the [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#cache). + +For more information, see the original [unstable announcement](https://blog.rust-lang.org/2023/12/11/cargo-cache-cleaning/) of this feature. Some parts of that design remain unstable, like the `gc` subcommand tracked in [cargo#13060](https://github.com/rust-lang/cargo/issues/13060), so there's still more to look forward to! + +### Let chains + +This feature allows `&&`-chaining `let` statements inside `if` and `while` conditions, even intermingling with boolean expressions, so there is less distinction between `if`/`if let` and `while`/`while let` anymore. The patterns inside the `let` sub-expressions can be irrefutable or refutable, and bindings are usable in later parts of the chain as well as the body. + +For example, [this actual snippet](https://github.com/rust-lang/rust/blob/28f1c807911c63f08d98e7b468cfcf15a441e34b/compiler/rustc_ast_passes/src/feature_gate.rs#L327-L338) from the compiler combines multiple conditions which would have required nesting `if let` and `if` blocks before: + +```rust + fn visit_generic_args(&mut self, args: &'a ast::GenericArgs) { + if let ast::GenericArgs::Parenthesized(generic_args) = args + && let ast::FnRetTy::Ty(ref ty) = generic_args.output + && matches!(ty.kind, ast::TyKind::Never) + { + gate!(&self, never_type, ty.span, "the `!` type is experimental"); + } + visit::walk_generic_args(self, args); + } +``` + +Let chains are only available in the Rust 2024 edition, as this feature depends on the [`if let` temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) change for more consistent drop order. Earlier efforts tried to work with all editions, but some difficult edges cases threatened the integrity of the implementation. 2024 made it feasible, so please upgrade your crate's edition if you'd like to use this feature! + +### Naked functions + +Rust now supports writing naked functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. This is a more ergonomic alternative to defining functions in a `global_asm!` block. A naked function is marked with the `#[unsafe(naked)]` attribute, and its body consists of a single `naked_asm!` call, for example: + +```rust +#[unsafe(naked)] +pub unsafe extern "sysv64" fn wrapping_add(a: u64, b: u64) { + // Equivalent to `a.wrapping_add(b)`. + core::arch::naked_asm!( + "add rax, rdi, rsi", + "ret" + ); +} +``` + +The handwritten assembly block defines the _entire_ function body: unlike non-naked functions, the compiler does not add any special handling for arguments or return values. Naked functions are used in low-level settings like Rust's [`compiler-builtins`](https://github.com/rust-lang/compiler-builtins), operating systems, and embedded applications. + +Look for a more detailed post soon on [Inside Rust](https://blog.rust-lang.org/inside-rust/)! + +### Boolean configuration + +The `cfg` predicate language now supports boolean literals, `true` and `false`, acting as a configuration that is always enabled or disabled, respectively. This works in Rust [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html) with `cfg` and `cfg_attr` attributes and the built-in `cfg!` macro, and also in Cargo `[target]` tables in both [configuration](https://doc.rust-lang.org/cargo/reference/config.html#target) and [manifests](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies). + +If you are familiar with set theory, you might already be using empty sets like `cfg(all())` for enabled and `cfg(any())` for disabled, but this meaning is rather implicit and easy to get backwards. The boolean literals offer a more direct way to say what you mean. + +See [RFC 3695](https://rust-lang.github.io/rfcs/3695-cfg-boolean-literals.html) for more! + +### Stabilized APIs + +- [`Cell::update`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.update) +- [`impl Default for *const T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*const+T) +- [`impl Default for *mut T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*mut+T) +- [`HashMap::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.extract_if) +- [`HashSet::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.extract_if) +- [`proc_macro::Span::line`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.line) +- [`proc_macro::Span::column`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.column) +- [`proc_macro::Span::start`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.start) +- [`proc_macro::Span::end`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.end) +- [`proc_macro::Span::file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.file) +- [`proc_macro::Span::local_file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.local_file) + +These previously stable APIs are now stable in const contexts: + +- [`NonNull::replace`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.replace) +- [`<*mut T>::replace`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.replace) +- [`std::ptr::swap_nonoverlapping`](https://github.com/rust-lang/rust/pull/137280) +- [`Cell::{replace, get, get_mut, from_mut, as_slice_of_cells}`](https://github.com/rust-lang/rust/pull/137928) + +### Other changes + +Check out everything that changed in [Rust](https://github.com/rust-lang/rust/releases/tag/1.88.0), [Cargo](https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-188-2025-06-26), and [Clippy](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-188). + +## Contributors to 1.88.0 + +Many people came together to create Rust 1.88.0. We couldn't have done it without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.88.0/) From d9311b69ed37b6a839a860cc15330bb22b10b288 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 25 Jun 2025 10:36:23 -0700 Subject: [PATCH 02/10] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> Co-authored-by: Jubilee Co-authored-by: Trevor Gross --- content/Rust-1.88.0.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index bf64a6b1f..e0f685291 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -34,7 +34,7 @@ For more information, see the original [unstable announcement](https://blog.rust ### Let chains -This feature allows `&&`-chaining `let` statements inside `if` and `while` conditions, even intermingling with boolean expressions, so there is less distinction between `if`/`if let` and `while`/`while let` anymore. The patterns inside the `let` sub-expressions can be irrefutable or refutable, and bindings are usable in later parts of the chain as well as the body. +This feature allows `&&`-chaining `let` statements inside `if` and `while` conditions, even intermingling with boolean expressions, so there is less distinction between `if`/`if let` and `while`/`while let`. The patterns inside the `let` sub-expressions can be irrefutable or refutable, and bindings are usable in later parts of the chain as well as the body. For example, [this actual snippet](https://github.com/rust-lang/rust/blob/28f1c807911c63f08d98e7b468cfcf15a441e34b/compiler/rustc_ast_passes/src/feature_gate.rs#L327-L338) from the compiler combines multiple conditions which would have required nesting `if let` and `if` blocks before: @@ -50,11 +50,13 @@ For example, [this actual snippet](https://github.com/rust-lang/rust/blob/28f1c8 } ``` -Let chains are only available in the Rust 2024 edition, as this feature depends on the [`if let` temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) change for more consistent drop order. Earlier efforts tried to work with all editions, but some difficult edges cases threatened the integrity of the implementation. 2024 made it feasible, so please upgrade your crate's edition if you'd like to use this feature! +Let chains are only available in the Rust 2024 edition, as this feature depends on the [`if let` temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) change for more consistent drop order. +Earlier efforts tried to work with all editions, but some difficult edge cases threatened the integrity of the implementation. 2024 made it feasible, so please upgrade your crate's edition if you'd like to use this feature! ### Naked functions -Rust now supports writing naked functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. This is a more ergonomic alternative to defining functions in a `global_asm!` block. A naked function is marked with the `#[unsafe(naked)]` attribute, and its body consists of a single `naked_asm!` call, for example: +Rust now supports writing naked functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. This is a more ergonomic alternative to defining functions in a `global_asm!` block. A naked function is marked with the `#[unsafe(naked)]` attribute, and its body consists of a single `naked_asm!` call. +For example: ```rust #[unsafe(naked)] @@ -69,15 +71,15 @@ pub unsafe extern "sysv64" fn wrapping_add(a: u64, b: u64) { The handwritten assembly block defines the _entire_ function body: unlike non-naked functions, the compiler does not add any special handling for arguments or return values. Naked functions are used in low-level settings like Rust's [`compiler-builtins`](https://github.com/rust-lang/compiler-builtins), operating systems, and embedded applications. -Look for a more detailed post soon on [Inside Rust](https://blog.rust-lang.org/inside-rust/)! +Look for a more detailed post on this soon! ### Boolean configuration The `cfg` predicate language now supports boolean literals, `true` and `false`, acting as a configuration that is always enabled or disabled, respectively. This works in Rust [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html) with `cfg` and `cfg_attr` attributes and the built-in `cfg!` macro, and also in Cargo `[target]` tables in both [configuration](https://doc.rust-lang.org/cargo/reference/config.html#target) and [manifests](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies). -If you are familiar with set theory, you might already be using empty sets like `cfg(all())` for enabled and `cfg(any())` for disabled, but this meaning is rather implicit and easy to get backwards. The boolean literals offer a more direct way to say what you mean. +If you are familiar with set theory, you might already be using empty sets like `cfg(all())` for enabled and `cfg(any())` for disabled, but this meaning is rather implicit and easy to get backwards. `cfg(true)` and `cfg(false)` offer a more direct way to say what you mean. -See [RFC 3695](https://rust-lang.github.io/rfcs/3695-cfg-boolean-literals.html) for more! +See [RFC 3695](https://rust-lang.github.io/rfcs/3695-cfg-boolean-literals.html) for more background! ### Stabilized APIs @@ -97,8 +99,12 @@ These previously stable APIs are now stable in const contexts: - [`NonNull::replace`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.replace) - [`<*mut T>::replace`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.replace) -- [`std::ptr::swap_nonoverlapping`](https://github.com/rust-lang/rust/pull/137280) -- [`Cell::{replace, get, get_mut, from_mut, as_slice_of_cells}`](https://github.com/rust-lang/rust/pull/137928) +- [`std::ptr::swap_nonoverlapping`](https://doc.rust-lang.org/stable/std/ptr/fn.swap_nonoverlapping.html) +- [`Cell::replace`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.replace) +- [`Cell::get`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.get) +- [`Cell::get_mut`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.get_mut) +- [`Cell::from_mut`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.from_mut) +- [`Cell::as_slice_of_cells`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.as_slice_of_cells) ### Other changes From 341f86d5055523c3122e750ba4f4b924ba0ebe33 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 25 Jun 2025 10:38:32 -0700 Subject: [PATCH 03/10] Use a simpler example of let chains --- content/Rust-1.88.0.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index e0f685291..09b197ac1 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -36,18 +36,16 @@ For more information, see the original [unstable announcement](https://blog.rust This feature allows `&&`-chaining `let` statements inside `if` and `while` conditions, even intermingling with boolean expressions, so there is less distinction between `if`/`if let` and `while`/`while let`. The patterns inside the `let` sub-expressions can be irrefutable or refutable, and bindings are usable in later parts of the chain as well as the body. -For example, [this actual snippet](https://github.com/rust-lang/rust/blob/28f1c807911c63f08d98e7b468cfcf15a441e34b/compiler/rustc_ast_passes/src/feature_gate.rs#L327-L338) from the compiler combines multiple conditions which would have required nesting `if let` and `if` blocks before: +For example, this snippet combines multiple conditions which would have required nesting `if let` and `if` blocks before: ```rust - fn visit_generic_args(&mut self, args: &'a ast::GenericArgs) { - if let ast::GenericArgs::Parenthesized(generic_args) = args - && let ast::FnRetTy::Ty(ref ty) = generic_args.output - && matches!(ty.kind, ast::TyKind::Never) - { - gate!(&self, never_type, ty.span, "the `!` type is experimental"); - } - visit::walk_generic_args(self, args); - } +if let Channel::Stable(v) = release_info() + && let Semver { major, minor, .. } = v + && major == 1 + && minor == 88 +{ + println!("`let_chains` was stabilized in this version"); +} ``` Let chains are only available in the Rust 2024 edition, as this feature depends on the [`if let` temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) change for more consistent drop order. From 368d77a9e5ef0ed4051ffa5de5334c578a52587b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 25 Jun 2025 10:39:18 -0700 Subject: [PATCH 04/10] Space out paragraphs --- content/Rust-1.88.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index 09b197ac1..1c68219b8 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -49,11 +49,13 @@ if let Channel::Stable(v) = release_info() ``` Let chains are only available in the Rust 2024 edition, as this feature depends on the [`if let` temporary scope](https://doc.rust-lang.org/edition-guide/rust-2024/temporary-if-let-scope.html) change for more consistent drop order. + Earlier efforts tried to work with all editions, but some difficult edge cases threatened the integrity of the implementation. 2024 made it feasible, so please upgrade your crate's edition if you'd like to use this feature! ### Naked functions Rust now supports writing naked functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. This is a more ergonomic alternative to defining functions in a `global_asm!` block. A naked function is marked with the `#[unsafe(naked)]` attribute, and its body consists of a single `naked_asm!` call. + For example: ```rust From 6cda4d7b4369105dd6b2075ad6027318d6829730 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 25 Jun 2025 10:47:36 -0700 Subject: [PATCH 05/10] Note the `i686-pc-windows-gnu` demotion --- content/Rust-1.88.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index 1c68219b8..96698e6e9 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -108,6 +108,8 @@ These previously stable APIs are now stable in const contexts: ### Other changes +The `i686-pc-windows-gnu` target has been demoted to Tier 2, as mentioned in an [earlier post](https://blog.rust-lang.org/2025/05/26/demoting-i686-pc-windows-gnu/). This won't have any immediate effect for users, since both the compiler and standard library tools will still be distributed by `rustup` for this target. However, with less testing than it had at Tier 1, it has more chance of accumulating bugs in the future. + Check out everything that changed in [Rust](https://github.com/rust-lang/rust/releases/tag/1.88.0), [Cargo](https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-188-2025-06-26), and [Clippy](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-188). ## Contributors to 1.88.0 From fd83a3d8dc90b79a349dd911fe128543131474a9 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 25 Jun 2025 10:49:23 -0700 Subject: [PATCH 06/10] Move Cargo GC down --- content/Rust-1.88.0.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index 96698e6e9..94e62d67f 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -22,16 +22,6 @@ If you'd like to help us out by testing future releases, you might consider upda ## What's in 1.88.0 stable -### Cargo automatic cache cleaning - -Starting in 1.88.0, Cargo will automatically run garbage collection on the cache in its home directory! - -When building, Cargo downloads and caches crates needed as dependencies. Historically, these downloaded files would never be cleaned up, leading to an unbounded amount of disk usage in Cargo's home directory. In this version, Cargo introduces a garbage collection mechanism to automatically clean up old files (e.g. `.crate` files). Cargo will remove files downloaded from the network if not accessed in 3 months, and files obtained from the local system if not accessed in 1 month. Note that this automatic garbage collection will not take place if running offline (using `--offline` or `--frozen`). - -Cargo 1.78 and newer track the access information needed for this garbage collection. This was introduced well before the actual cleanup that's starting now, in order to reduce cache churn for those that still use prior versions. If you regularly use versions of Cargo even older than 1.78, in addition to running current versions of Cargo, and you expect to have some crates accessed exclusively by the older versions of Cargo and don't want to re-download those crates every ~3 months, you may wish to set `cache.auto-clean-frequency = "never"` in the Cargo configuration, as described in the [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#cache). - -For more information, see the original [unstable announcement](https://blog.rust-lang.org/2023/12/11/cargo-cache-cleaning/) of this feature. Some parts of that design remain unstable, like the `gc` subcommand tracked in [cargo#13060](https://github.com/rust-lang/cargo/issues/13060), so there's still more to look forward to! - ### Let chains This feature allows `&&`-chaining `let` statements inside `if` and `while` conditions, even intermingling with boolean expressions, so there is less distinction between `if`/`if let` and `while`/`while let`. The patterns inside the `let` sub-expressions can be irrefutable or refutable, and bindings are usable in later parts of the chain as well as the body. @@ -81,6 +71,16 @@ If you are familiar with set theory, you might already be using empty sets like See [RFC 3695](https://rust-lang.github.io/rfcs/3695-cfg-boolean-literals.html) for more background! +### Cargo automatic cache cleaning + +Starting in 1.88.0, Cargo will automatically run garbage collection on the cache in its home directory! + +When building, Cargo downloads and caches crates needed as dependencies. Historically, these downloaded files would never be cleaned up, leading to an unbounded amount of disk usage in Cargo's home directory. In this version, Cargo introduces a garbage collection mechanism to automatically clean up old files (e.g. `.crate` files). Cargo will remove files downloaded from the network if not accessed in 3 months, and files obtained from the local system if not accessed in 1 month. Note that this automatic garbage collection will not take place if running offline (using `--offline` or `--frozen`). + +Cargo 1.78 and newer track the access information needed for this garbage collection. This was introduced well before the actual cleanup that's starting now, in order to reduce cache churn for those that still use prior versions. If you regularly use versions of Cargo even older than 1.78, in addition to running current versions of Cargo, and you expect to have some crates accessed exclusively by the older versions of Cargo and don't want to re-download those crates every ~3 months, you may wish to set `cache.auto-clean-frequency = "never"` in the Cargo configuration, as described in the [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#cache). + +For more information, see the original [unstable announcement](https://blog.rust-lang.org/2023/12/11/cargo-cache-cleaning/) of this feature. Some parts of that design remain unstable, like the `gc` subcommand tracked in [cargo#13060](https://github.com/rust-lang/cargo/issues/13060), so there's still more to look forward to! + ### Stabilized APIs - [`Cell::update`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.update) From 2fd2fa2f6dd7f5cb3ba3ff7e4e5eda822f7f731c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 25 Jun 2025 10:54:50 -0700 Subject: [PATCH 07/10] Nevermind the set theory --- content/Rust-1.88.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index 94e62d67f..a8fca78d1 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -67,7 +67,7 @@ Look for a more detailed post on this soon! The `cfg` predicate language now supports boolean literals, `true` and `false`, acting as a configuration that is always enabled or disabled, respectively. This works in Rust [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html) with `cfg` and `cfg_attr` attributes and the built-in `cfg!` macro, and also in Cargo `[target]` tables in both [configuration](https://doc.rust-lang.org/cargo/reference/config.html#target) and [manifests](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#platform-specific-dependencies). -If you are familiar with set theory, you might already be using empty sets like `cfg(all())` for enabled and `cfg(any())` for disabled, but this meaning is rather implicit and easy to get backwards. `cfg(true)` and `cfg(false)` offer a more direct way to say what you mean. +Previously, empty predicate lists could be used for unconditional configuration, like `cfg(all())` for enabled and `cfg(any())` for disabled, but this meaning is rather implicit and easy to get backwards. `cfg(true)` and `cfg(false)` offer a more direct way to say what you mean. See [RFC 3695](https://rust-lang.github.io/rfcs/3695-cfg-boolean-literals.html) for more background! From 127a7ed702709658ed4f604c3888fc3e3fa68f77 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 26 Jun 2025 08:57:10 -0700 Subject: [PATCH 08/10] Mention `as_chunks` etc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> --- content/Rust-1.88.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index a8fca78d1..360d44b47 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -94,6 +94,12 @@ For more information, see the original [unstable announcement](https://blog.rust - [`proc_macro::Span::end`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.end) - [`proc_macro::Span::file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.file) - [`proc_macro::Span::local_file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.local_file) +- [`[T]::as_chunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks) +- [`[T]::as_rchunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks) +- [`[T]::as_chunks_unchecked`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked) +- [`[T]::as_chunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_mut) +- [`[T]::as_rchunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks_mut) +- [`[T]::as_chunks_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked_mut) These previously stable APIs are now stable in const contexts: From 6457429e3d8a54ef1044b20639ae3540b9ea9ee7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 26 Jun 2025 08:59:37 -0700 Subject: [PATCH 09/10] Use `<[T]>::as_...` syntax --- content/Rust-1.88.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index 360d44b47..ffc1ba0b0 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -94,12 +94,12 @@ For more information, see the original [unstable announcement](https://blog.rust - [`proc_macro::Span::end`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.end) - [`proc_macro::Span::file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.file) - [`proc_macro::Span::local_file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.local_file) -- [`[T]::as_chunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks) -- [`[T]::as_rchunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks) -- [`[T]::as_chunks_unchecked`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked) -- [`[T]::as_chunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_mut) -- [`[T]::as_rchunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks_mut) -- [`[T]::as_chunks_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked_mut) +- [`<[T]>::as_chunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks) +- [`<[T]>::as_rchunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks) +- [`<[T]>::as_chunks_unchecked`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked) +- [`<[T]>::as_chunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_mut) +- [`<[T]>::as_rchunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks_mut) +- [`<[T]>::as_chunks_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked_mut) These previously stable APIs are now stable in const contexts: From 5149d524c7b2adc536504281f43fb12908df40a5 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 26 Jun 2025 09:01:54 -0700 Subject: [PATCH 10/10] Add a couple more APIs --- content/Rust-1.88.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/Rust-1.88.0.md b/content/Rust-1.88.0.md index ffc1ba0b0..74b19e147 100644 --- a/content/Rust-1.88.0.md +++ b/content/Rust-1.88.0.md @@ -86,8 +86,10 @@ For more information, see the original [unstable announcement](https://blog.rust - [`Cell::update`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.update) - [`impl Default for *const T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*const+T) - [`impl Default for *mut T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*mut+T) +- [`mod ffi::c_str`](https://doc.rust-lang.org/stable/std/ffi/c_str/index.html) - [`HashMap::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.extract_if) - [`HashSet::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.extract_if) +- [`hint::select_unpredictable`](https://doc.rust-lang.org/stable/std/hint/fn.select_unpredictable.html) - [`proc_macro::Span::line`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.line) - [`proc_macro::Span::column`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.column) - [`proc_macro::Span::start`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.start)