Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ impl String {

/// Creates a new `String` from a length, capacity, and pointer.
///
/// # Unsafety
/// # Safety
///
/// This is _very_ unsafe because:
///
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,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
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down