diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-02-25 11:42:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-25 11:42:23 +0100 |
| commit | 2019d965c3fc4b330b99e1a961d4e2c1ce74583e (patch) | |
| tree | ead9b4bd4f3e4236990d3725e57154f6d6c3d728 /src | |
| parent | 53f15f24a8f5373231f43cc0b201d803e512c079 (diff) | |
| parent | 4ca865e92934f003dd477f1801ae0f2096e272e5 (diff) | |
| download | rust-2019d965c3fc4b330b99e1a961d4e2c1ce74583e.tar.gz rust-2019d965c3fc4b330b99e1a961d4e2c1ce74583e.zip | |
Rollup merge of #58718 - Centril:doc-convention-safety, r=RalfJung
Apply docs convention: Replace # Unsafety with # Safety in docs As used in RFC 1574: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#using-markdown "Safety" is used many times more than "Unsafety" is within existing docs. @bors rollup r? @RalfJung
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/alloc.rs | 4 | ||||
| -rw-r--r-- | src/libcore/mem.rs | 6 | ||||
| -rw-r--r-- | src/libcore/slice/mod.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index f49e226a5cb..e842020561d 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -420,7 +420,7 @@ impl fmt::Display for CannotReallocInPlace { /// } /// ``` /// -/// # Unsafety +/// # Safety /// /// The `GlobalAlloc` trait is an `unsafe` trait for a number of reasons, and /// implementors must ensure that they adhere to these contracts: @@ -643,7 +643,7 @@ pub unsafe trait GlobalAlloc { /// currently allocated via an allocator `a`, then it is legal to /// use that layout to deallocate it, i.e., `a.dealloc(ptr, k);`. /// -/// # Unsafety +/// # Safety /// /// The `Alloc` trait is an `unsafe` trait for a number of reasons, and /// implementors must ensure that they adhere to these contracts: diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 43afc9a522a..f41d293e80a 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1173,7 +1173,7 @@ impl<T> MaybeUninit<T> { /// to ensure that the data will get dropped, because the resulting `T` is /// subject to the usual drop handling. /// - /// # Unsafety + /// # Safety /// /// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized /// state. Calling this when the content is not yet fully initialized causes undefined @@ -1187,7 +1187,7 @@ impl<T> MaybeUninit<T> { /// Gets a reference to the contained value. /// - /// # Unsafety + /// # Safety /// /// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized /// state. Calling this when the content is not yet fully initialized causes undefined @@ -1200,7 +1200,7 @@ impl<T> MaybeUninit<T> { /// Gets a mutable reference to the contained value. /// - /// # Unsafety + /// # Safety /// /// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized /// state. Calling this when the content is not yet fully initialized causes undefined diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index d89443662df..2063f8ffaf6 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2158,7 +2158,7 @@ impl<T> [T] { /// This method has no purpose when either input element `T` or output element `U` are /// zero-sized and will return the original slice without splitting anything. /// - /// # Unsafety + /// # Safety /// /// This method is essentially a `transmute` with respect to the elements in the returned /// middle slice, so all the usual caveats pertaining to `transmute::<T, U>` also apply here. @@ -2211,7 +2211,7 @@ impl<T> [T] { /// This method has no purpose when either input element `T` or output element `U` are /// zero-sized and will return the original slice without splitting anything. /// - /// # Unsafety + /// # Safety /// /// This method is essentially a `transmute` with respect to the elements in the returned /// middle slice, so all the usual caveats pertaining to `transmute::<T, U>` also apply here. |
