about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-10-24 06:26:50 +0000
committerbors <bors@rust-lang.org>2015-10-24 06:26:50 +0000
commit8d41c6fc0ae1aea6ad944885adc8326d5c35a410 (patch)
treef3c7dcb8e574bc759239fa06b3a8ed3e9257ecb1
parentd689182e5d271f76604c951b6004546a3a7f0c0c (diff)
parentb17433292decc3ea1d1c3b318d2c1f6b7c6544af (diff)
downloadrust-8d41c6fc0ae1aea6ad944885adc8326d5c35a410.tar.gz
rust-8d41c6fc0ae1aea6ad944885adc8326d5c35a410.zip
Auto merge of #29252 - steveklabnik:safety, r=alexcrichton
Follow https://doc.rust-lang.org/book/documentation.html#special-sections
-rw-r--r--src/libcollections/str.rs2
-rw-r--r--src/libcollections/string.rs4
-rw-r--r--src/libcollections/vec.rs2
-rw-r--r--src/libcore/cell.rs4
-rw-r--r--src/libcore/slice.rs2
-rw-r--r--src/libcore/str/mod.rs2
-rw-r--r--src/liblibc/lib.rs2
7 files changed, 9 insertions, 9 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index 023edf29341..81bf3bab36f 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -254,7 +254,7 @@ impl str {
     ///
     /// Returns the substring from [`begin`..`end`).
     ///
-    /// # Unsafety
+    /// # Safety
     ///
     /// Caller must check both UTF-8 sequence boundaries and the boundaries
     /// of the entire slice as well.
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 0815a2c4de9..8217e694e2d 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -361,7 +361,7 @@ impl String {
 
     /// Creates a new `String` from a length, capacity, and pointer.
     ///
-    /// # Unsafety
+    /// # Safety
     ///
     /// This is _very_ unsafe because:
     ///
@@ -385,7 +385,7 @@ impl String {
     ///
     /// [fromutf8]: struct.String.html#method.from_utf8
     ///
-    /// # Unsafety
+    /// # Safety
     ///
     /// This function is unsafe because it does not check that the bytes passed to
     /// it are valid UTF-8. If this constraint is violated, undefined behavior
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 40e1222c884..69530493aa1 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -284,7 +284,7 @@ impl<T> Vec<T> {
 
     /// Creates a `Vec<T>` directly from the raw components of another vector.
     ///
-    /// # Unsafety
+    /// # Safety
     ///
     /// This is highly unsafe, due to the number of invariants that aren't
     /// checked:
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 0d717992ce8..1dc989018ad 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -214,7 +214,7 @@ impl<T:Copy> Cell<T> {
 
     /// Returns a reference to the underlying `UnsafeCell`.
     ///
-    /// # Unsafety
+    /// # Safety
     ///
     /// This function is `unsafe` because `UnsafeCell`'s field is public.
     ///
@@ -813,7 +813,7 @@ impl<T> UnsafeCell<T> {
 
     /// Unwraps the value.
     ///
-    /// # Unsafety
+    /// # Safety
     ///
     /// This function is unsafe because this thread or another thread may currently be
     /// inspecting the inner value.
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 8e3eba15b4e..f6b262c9494 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -1435,7 +1435,7 @@ pub fn mut_ref_slice<A>(s: &mut A) -> &mut [A] {
 ///
 /// The `len` argument is the number of **elements**, not the number of bytes.
 ///
-/// # Unsafety
+/// # Safety
 ///
 /// This function is unsafe as there is no guarantee that the given pointer is
 /// valid for `len` elements, nor whether the lifetime inferred is a suitable
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index c0a85e0df06..b7adfa8b7f8 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -247,7 +247,7 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
 ///
 /// [fromutf8]: fn.from_utf8.html
 ///
-/// # Unsafety
+/// # Safety
 ///
 /// This function is unsafe because it does not check that the bytes passed to
 /// it are valid UTF-8. If this constraint is violated, undefined behavior
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index 212bf4416bd..13902d67437 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -6163,7 +6163,7 @@ pub mod funcs {
 
                 /// Exits the running program in a possibly dangerous manner.
                 ///
-                /// # Unsafety
+                /// # Safety
                 ///
                 /// While this forces your program to exit, it does so in a way that has
                 /// consequences. This will skip all unwinding code, which means that anything