commit | 1817de609b0ffaab0cf32de6baae5944f6f6e7d6 | [log] [tgz] |
---|---|---|
author | Matthias Krüger <matthias.krueger@famsik.de> | Wed Oct 16 19:18:30 2024 +0200 |
committer | GitHub <noreply@github.com> | Wed Oct 16 19:18:30 2024 +0200 |
tree | 6b686cf6926cfb90564eb8a179c45d3325a54e2d | |
parent | 0037048da8ed19feef7ee1437f123a88a7342b33 [diff] | |
parent | 94ab726c7856cd7716d2a33db3e1915faed99008 [diff] |
Rollup merge of #130822 - bjoernager:non-null-from-ref, r=dtolnay Add `from_ref` and `from_mut` constructors to `core::ptr::NonNull`. Relevant tracking issue: #130823 The `core::ptr::NonNull` type should have the convenience constructors `from_ref` and `from_mut` for parity with `core::ptr::from_ref` and `core::ptr::from_mut`. Although the type in question already implements `From<&T>` and `From<&mut T>`, these new functions also carry the ability to be used in constant expressions (due to not being behind a trait).
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrate with other languages.
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the media guide.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.