Skip to content

Rollup of 4 pull requests #31661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 15, 2016
2 changes: 1 addition & 1 deletion src/doc/book/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You get this error:

```text
expected one of `!`, `:`, or `@`, found `)`
fn print_number(x, y) {
fn print_sum(x, y) {
```

This is a deliberate design decision. While full-program inference is possible,
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The second, with a `\`, trims the spaces and the newline:

```rust
let s = "foo\
bar";
bar";

assert_eq!("foobar", s);
```
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ macro_rules! int_impl {
}
}

/// Checked negation. Computes `!self`, returning `None` if `self ==
/// Checked negation. Computes `-self`, returning `None` if `self ==
/// MIN`.
///
/// # Examples
Expand Down
3 changes: 1 addition & 2 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
tmp
}

/// Variant of read_and_zero that writes the specific drop-flag byte
/// (which may be more appropriate than zero).
#[allow(missing_docs)]
#[inline(always)]
#[unstable(feature = "filling_drop",
reason = "may play a larger role in std::ptr future extensions",
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ impl Utf8Error {
/// // std::str::from_utf8 returns a Utf8Error
/// let error = str::from_utf8(&sparkle_heart).unwrap_err();
///
/// // the first byte is invalid here
/// // the second byte is invalid here
/// assert_eq!(1, error.valid_up_to());
/// ```
#[stable(feature = "utf8_error", since = "1.5.0")]
Expand All @@ -174,10 +174,10 @@ impl Utf8Error {
///
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
/// incur the overhead of the validity check, there is an unsafe version of
/// this function, [`from_utf8_unchecked()`][fromutf8], which has the same
/// this function, [`from_utf8_unchecked()`][fromutf8u], which has the same
/// behavior but skips the check.
///
/// [fromutf8]: fn.from_utf8.html
/// [fromutf8u]: fn.from_utf8_unchecked.html
///
/// If you need a `String` instead of a `&str`, consider
/// [`String::from_utf8()`][string].
Expand Down Expand Up @@ -275,7 +275,7 @@ unsafe fn from_raw_parts_mut<'a>(p: *mut u8, len: usize) -> &'a mut str {
/// Converts a slice of bytes to a string slice without checking
/// that the string contains valid UTF-8.
///
/// See the safe version, [`from_utf8()`][fromutf8], for more.
/// See the safe version, [`from_utf8()`][fromutf8], for more information.
///
/// [fromutf8]: fn.from_utf8.html
///
Expand Down