Skip to content

Commit 33fa870

Browse files
committed
Auto merge of rust-lang#132943 - matthiaskrgr:rollup-164l3ej, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#132651 (Remove attributes from generics in built-in derive macros) - rust-lang#132668 (Feature gate yield expressions not in 2024) - rust-lang#132771 (test(configure): cover `parse_args` in `src/bootstrap/configure.py`) - rust-lang#132895 (Generalize `NonNull::from_raw_parts` per ACP362) - rust-lang#132914 (Update grammar in std::cell docs.) - rust-lang#132927 (Consolidate type system const evaluation under `traits::evaluate_const`) - rust-lang#132935 (Make sure to ignore elided lifetimes when pointing at args for fulfillment errors) - rust-lang#132941 (Subtree update of `rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4a20245 + 7f12f02 commit 33fa870

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/cell.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! Rust memory safety is based on this rule: Given an object `T`, it is only possible to
44
//! have one of the following:
55
//!
6-
//! - Having several immutable references (`&T`) to the object (also known as **aliasing**).
7-
//! - Having one mutable reference (`&mut T`) to the object (also known as **mutability**).
6+
//! - Several immutable references (`&T`) to the object (also known as **aliasing**).
7+
//! - One mutable reference (`&mut T`) to the object (also known as **mutability**).
88
//!
99
//! This is enforced by the Rust compiler. However, there are situations where this rule is not
1010
//! flexible enough. Sometimes it is required to have multiple references to an object and yet

core/src/ptr/non_null.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl<T: ?Sized> NonNull<T> {
251251
#[unstable(feature = "ptr_metadata", issue = "81513")]
252252
#[inline]
253253
pub const fn from_raw_parts(
254-
data_pointer: NonNull<()>,
254+
data_pointer: NonNull<impl super::Thin>,
255255
metadata: <T as super::Pointee>::Metadata,
256256
) -> NonNull<T> {
257257
// SAFETY: The result of `ptr::from::raw_parts_mut` is non-null because `data_pointer` is.

0 commit comments

Comments
 (0)