Skip to content

Commit 8305398

Browse files
committedApr 18, 2022
Auto merge of #96178 - Dylan-DPC:rollup-6z8pcob, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #96032 (Update books) - #96136 (Reword clarification on lifetime for ptr->ref safety docs) - #96143 (Fix snapshot --bless not working anymore in htmldocck) - #96148 (Use revisions instead of nll compare mode for `/self/` ui tests) - #96156 (Replace u8to64_le macro with u64::from_le_bytes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0516711 + 55e3997 commit 8305398

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+387
-237
lines changed
 

‎library/core/src/ptr/const_ptr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<T: ?Sized> *const T {
295295
///
296296
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
297297
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
298-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
298+
/// In particular, while this reference exists, the memory the pointer points to must
299299
/// not get mutated (except inside `UnsafeCell`).
300300
///
301301
/// This applies even if the result of this method is unused!
@@ -358,7 +358,7 @@ impl<T: ?Sized> *const T {
358358
///
359359
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
360360
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
361-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
361+
/// In particular, while this reference exists, the memory the pointer points to must
362362
/// not get mutated (except inside `UnsafeCell`).
363363
///
364364
/// This applies even if the result of this method is unused!
@@ -1188,7 +1188,7 @@ impl<T> *const [T] {
11881188
///
11891189
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
11901190
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
1191-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
1191+
/// In particular, while this reference exists, the memory the pointer points to must
11921192
/// not get mutated (except inside `UnsafeCell`).
11931193
///
11941194
/// This applies even if the result of this method is unused!

‎library/core/src/ptr/mut_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl<T: ?Sized> *mut T {
302302
///
303303
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
304304
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
305-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
305+
/// In particular, while this reference exists, the memory the pointer points to must
306306
/// not get mutated (except inside `UnsafeCell`).
307307
///
308308
/// This applies even if the result of this method is unused!
@@ -368,7 +368,7 @@ impl<T: ?Sized> *mut T {
368368
///
369369
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
370370
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
371-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
371+
/// In particular, while this reference exists, the memory the pointer points to must
372372
/// not get mutated (except inside `UnsafeCell`).
373373
///
374374
/// This applies even if the result of this method is unused!
@@ -550,7 +550,7 @@ impl<T: ?Sized> *mut T {
550550
///
551551
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
552552
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
553-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
553+
/// In particular, while this reference exists, the memory the pointer points to must
554554
/// not get accessed (read or written) through any other pointer.
555555
///
556556
/// This applies even if the result of this method is unused!
@@ -615,7 +615,7 @@ impl<T: ?Sized> *mut T {
615615
///
616616
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
617617
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
618-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
618+
/// In particular, while this reference exists, the memory the pointer points to must
619619
/// not get accessed (read or written) through any other pointer.
620620
///
621621
/// This applies even if the result of this method is unused!
@@ -1461,7 +1461,7 @@ impl<T> *mut [T] {
14611461
///
14621462
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
14631463
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
1464-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
1464+
/// In particular, while this reference exists, the memory the pointer points to must
14651465
/// not get mutated (except inside `UnsafeCell`).
14661466
///
14671467
/// This applies even if the result of this method is unused!
@@ -1513,7 +1513,7 @@ impl<T> *mut [T] {
15131513
///
15141514
/// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is
15151515
/// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data.
1516-
/// In particular, for the duration of this lifetime, the memory the pointer points to must
1516+
/// In particular, while this reference exists, the memory the pointer points to must
15171517
/// not get accessed (read or written) through any other pointer.
15181518
///
15191519
/// This applies even if the result of this method is unused!

0 commit comments

Comments
 (0)
Please sign in to comment.