X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fcore%2Fsrc%2Fptr%2Fnon_null.rs;fp=library%2Fcore%2Fsrc%2Fptr%2Fnon_null.rs;h=5ebe61509063f3a7807bacdc5ace278d7666366b;hb=be30e4044052fb0c74166a761eaec69c17fd2d54;hp=6f402924e75dfadec1cb0bb3acdf2ff0e8c40e6c;hpb=2c28b0eaf9843ec0f493fca2dba506fe4d9174fb;p=rust.git diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 6f402924e75..5ebe6150906 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -114,7 +114,7 @@ pub const fn dangling() -> Self { /// /// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is /// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data. - /// In particular, for the duration of this lifetime, the memory the pointer points to must + /// In particular, while this reference exists, the memory the pointer points to must /// not get mutated (except inside `UnsafeCell`). /// /// This applies even if the result of this method is unused! @@ -148,7 +148,7 @@ pub const fn dangling() -> Self { /// /// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is /// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data. - /// In particular, for the duration of this lifetime, the memory the pointer points to must + /// In particular, while this reference exists, the memory the pointer points to must /// not get accessed (read or written) through any other pointer. /// /// This applies even if the result of this method is unused! @@ -350,7 +350,7 @@ pub const fn as_ptr(self) -> *mut T { /// /// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is /// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data. - /// In particular, for the duration of this lifetime, the memory the pointer points to must + /// In particular, while this reference exists, the memory the pointer points to must /// not get mutated (except inside `UnsafeCell`). /// /// This applies even if the result of this method is unused! @@ -400,7 +400,7 @@ pub const fn as_ptr(self) -> *mut T { /// /// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is /// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data. - /// In particular, for the duration of this lifetime, the memory the pointer points to must + /// In particular, while this reference exists, the memory the pointer points to must /// not get accessed (read or written) through any other pointer. /// /// This applies even if the result of this method is unused! @@ -580,7 +580,7 @@ pub const fn as_mut_ptr(self) -> *mut T { /// /// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is /// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data. - /// In particular, for the duration of this lifetime, the memory the pointer points to must + /// In particular, while this reference exists, the memory the pointer points to must /// not get mutated (except inside `UnsafeCell`). /// /// This applies even if the result of this method is unused! @@ -626,7 +626,7 @@ pub const fn as_mut_ptr(self) -> *mut T { /// /// * You must enforce Rust's aliasing rules, since the returned lifetime `'a` is /// arbitrarily chosen and does not necessarily reflect the actual lifetime of the data. - /// In particular, for the duration of this lifetime, the memory the pointer points to must + /// In particular, while this reference exists, the memory the pointer points to must /// not get accessed (read or written) through any other pointer. /// /// This applies even if the result of this method is unused!