Skip to content

Commit 65f9cb5

Browse files
author
The Miri Cronjob Bot
committed
Merge ref '3507a749b365' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 3507a74 Filtered ref: 67f9124a1e199effc310447c1c1f9548093bd8f9 This merge was created using https://github.com/rust-lang/josh-sync.
2 parents 8f49327 + 7de45d7 commit 65f9cb5

File tree

33 files changed

+935
-137
lines changed

33 files changed

+935
-137
lines changed

alloc/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
#![feature(async_iterator)]
103103
#![feature(bstr)]
104104
#![feature(bstr_internals)]
105+
#![feature(cast_maybe_uninit)]
105106
#![feature(char_internals)]
106107
#![feature(char_max_len)]
107108
#![feature(clone_to_uninit)]

alloc/src/vec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,7 @@ impl<T, A: Allocator> Vec<T, A> {
31763176
// - but the allocation extends out to `self.buf.capacity()` elements, possibly
31773177
// uninitialized
31783178
let spare_ptr = unsafe { ptr.add(self.len) };
3179-
let spare_ptr = spare_ptr.cast::<MaybeUninit<T>>();
3179+
let spare_ptr = spare_ptr.cast_uninit();
31803180
let spare_len = self.buf.capacity() - self.len;
31813181

31823182
// SAFETY:

core/src/alloc/layout.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@ impl Layout {
226226

227227
/// Creates a `NonNull` that is dangling, but well-aligned for this Layout.
228228
///
229-
/// Note that the pointer value may potentially represent a valid pointer,
230-
/// which means this must not be used as a "not yet initialized"
231-
/// sentinel value. Types that lazily allocate must track initialization by
232-
/// some other means.
229+
/// Note that the address of the returned pointer may potentially
230+
/// be that of a valid pointer, which means this must not be used
231+
/// as a "not yet initialized" sentinel value.
232+
/// Types that lazily allocate must track initialization by some other means.
233233
#[unstable(feature = "alloc_layout_extra", issue = "55724")]
234234
#[must_use]
235235
#[inline]

0 commit comments

Comments
 (0)