- 
                Notifications
    You must be signed in to change notification settings 
- Fork 314
Announcing Rust 1.72.0 #1129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Announcing Rust 1.72.0 #1129
Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            7 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      2e8f90b
              
                Announcing Rust 1.72.0
              
              
                cuviper 4d233c7
              
                Add entry about unlimited const evaluation
              
              
                joshtriplett b804db2
              
                Add a heading for the Windows note
              
              
                cuviper 2861d7f
              
                Note why invalid_reference_casting is allowed
              
              
                cuviper 35546fb
              
                Note the Windows change will be host and target
              
              
                cuviper 67b27d5
              
                Add a section on cfg-disabled items
              
              
                cuviper d79cd94
              
                Update posts/2023-08-24-Rust-1.72.0.md
              
              
                Mark-Simulacrum File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| layout: post | ||
| title: "Announcing Rust 1.72.0" | ||
| author: The Rust Release Team | ||
| release: true | ||
| --- | ||
|  | ||
| The Rust team is happy to announce a new version of Rust, 1.72.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.72.0 with: | ||
|  | ||
| ```console | ||
| 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.72.0](https://github.com/rust-lang/rust/releases/tag/1.72.0) on GitHub. | ||
|  | ||
| 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.72.0 stable | ||
|  | ||
| ### Uplifted lints from Clippy | ||
|  | ||
| Several lints from Clippy have been pulled into `rustc`: | ||
|  | ||
| * [`clippy::undropped_manually_drops`](https://rust-lang.github.io/rust-clippy/rust-1.71.0/index.html#undropped_manually_drops) to [`undropped_manually_drops`](https://doc.rust-lang.org/1.72.0/rustc/lints/listing/deny-by-default.html#undropped-manually-drops) (deny) | ||
| - `ManuallyDrop` does not drop its inner value, so calling `std::mem::drop` on it does nothing. Instead, the lint will suggest `ManuallyDrop::into_inner` first, or you may use the unsafe `ManuallyDrop::drop` to run the destructor in-place. This lint is denied by default. | ||
|  | ||
| * [`clippy::invalid_utf8_in_unchecked`](https://rust-lang.github.io/rust-clippy/rust-1.71.0/index.html#invalid_utf8_in_unchecked) to [`invalid_from_utf8_unchecked`](https://doc.rust-lang.org/1.72.0/rustc/lints/listing/deny-by-default.html#invalid-from-utf8-unchecked) (deny) and [`invalid_from_utf8`](https://doc.rust-lang.org/1.72.0/rustc/lints/listing/warn-by-default.html#invalid-from-utf8) (warn) | ||
| - The first checks for calls to `std::str::from_utf8_unchecked` and `std::str::from_utf8_unchecked_mut` with an invalid UTF-8 literal, which violates their safety pre-conditions, resulting in undefined behavior. This lint is denied by default. | ||
| - The second checks for calls to `std::str::from_utf8` and `std::str::from_utf8_mut` with an invalid UTF-8 literal, which will always return an error. This lint is a warning by default. | ||
|  | ||
| * [`clippy::cmp_nan`](https://rust-lang.github.io/rust-clippy/rust-1.71.0/index.html#cmp_nan) to [`invalid_nan_comparisons`](https://doc.rust-lang.org/1.72.0/rustc/lints/listing/warn-by-default.html#invalid-nan-comparisons) (warn) | ||
| - This checks for comparisons with `f32::NAN` or `f64::NAN` as one of the operands. NaN does not compare meaningfully to anything – not even itself – so those comparisons are always false. This lint is a warning by default, and will suggest calling the `is_nan()` method instead. | ||
|  | ||
| * [`clippy::cast_ref_to_mut`](https://rust-lang.github.io/rust-clippy/rust-1.71.0/index.html#cast_ref_to_mut) to [`invalid_reference_casting`](https://doc.rust-lang.org/1.72.0/rustc/lints/listing/allowed-by-default.html#invalid-reference-casting) (allow) | ||
|         
                  cuviper marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| - This checks for casts of `&T` to `&mut T` without using interior mutability, which is immediate undefined behavior, even if the reference is unused. This lint is currently allowed by default, but it is planned to be denied by default in 1.73 after implementation improvements. | ||
|  | ||
| ### Stabilized APIs | ||
|  | ||
| - [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/stable/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E) | ||
| - [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str) | ||
| - [`String::leak`](https://doc.rust-lang.org/stable/alloc/string/struct.String.html#method.leak) | ||
|  | ||
| These APIs are now stable in const contexts: | ||
|  | ||
| - [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.from_bytes_with_nul) | ||
| - [`CStr::to_bytes`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.to_bytes) | ||
| - [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.to_bytes_with_nul) | ||
| - [`CStr::to_str`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#method.to_str) | ||
|  | ||
| ### Other changes | ||
|  | ||
| Check out everything that changed in [Rust](https://github.com/rust-lang/rust/releases/tag/1.72.0), [Cargo](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-172-2023-08-24), and [Clippy](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-172). | ||
|  | ||
| In a future release we're planning to increase the minimum supported Windows version to 10. The accepted proposal in compiler [MCP 651](https://github.com/rust-lang/compiler-team/issues/651) is that Rust 1.75 will be the last to officially support Windows 7, 8, and 8.1. When Rust 1.76 is released in February 2024, only Windows 10 and later will be supported as tier-1 targets. | ||
|         
                  cuviper marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved         
                  cuviper marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
|  | ||
| ## Contributors to 1.72.0 | ||
|  | ||
| Many people came together to create Rust 1.72.0. We couldn't have done it without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.72.0/) | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.