Skip to content

Commit 2808df9

Browse files
committed
Auto merge of #31661 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #31607, #31649, #31655, #31658 - Failed merges:
2 parents a888333 + fb09a44 commit 2808df9

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/doc/book/functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You get this error:
6868

6969
```text
7070
expected one of `!`, `:`, or `@`, found `)`
71-
fn print_number(x, y) {
71+
fn print_sum(x, y) {
7272
```
7373

7474
This is a deliberate design decision. While full-program inference is possible,

src/doc/book/strings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The second, with a `\`, trims the spaces and the newline:
3939

4040
```rust
4141
let s = "foo\
42-
bar";
42+
bar";
4343

4444
assert_eq!("foobar", s);
4545
```

src/libcore/num/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ macro_rules! int_impl {
479479
}
480480
}
481481

482-
/// Checked negation. Computes `!self`, returning `None` if `self ==
482+
/// Checked negation. Computes `-self`, returning `None` if `self ==
483483
/// MIN`.
484484
///
485485
/// # Examples

src/libcore/ptr.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
127127
tmp
128128
}
129129

130-
/// Variant of read_and_zero that writes the specific drop-flag byte
131-
/// (which may be more appropriate than zero).
130+
#[allow(missing_docs)]
132131
#[inline(always)]
133132
#[unstable(feature = "filling_drop",
134133
reason = "may play a larger role in std::ptr future extensions",

src/libcore/str/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Utf8Error {
157157
/// // std::str::from_utf8 returns a Utf8Error
158158
/// let error = str::from_utf8(&sparkle_heart).unwrap_err();
159159
///
160-
/// // the first byte is invalid here
160+
/// // the second byte is invalid here
161161
/// assert_eq!(1, error.valid_up_to());
162162
/// ```
163163
#[stable(feature = "utf8_error", since = "1.5.0")]
@@ -174,10 +174,10 @@ impl Utf8Error {
174174
///
175175
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
176176
/// incur the overhead of the validity check, there is an unsafe version of
177-
/// this function, [`from_utf8_unchecked()`][fromutf8], which has the same
177+
/// this function, [`from_utf8_unchecked()`][fromutf8u], which has the same
178178
/// behavior but skips the check.
179179
///
180-
/// [fromutf8]: fn.from_utf8.html
180+
/// [fromutf8u]: fn.from_utf8_unchecked.html
181181
///
182182
/// If you need a `String` instead of a `&str`, consider
183183
/// [`String::from_utf8()`][string].
@@ -275,7 +275,7 @@ unsafe fn from_raw_parts_mut<'a>(p: *mut u8, len: usize) -> &'a mut str {
275275
/// Converts a slice of bytes to a string slice without checking
276276
/// that the string contains valid UTF-8.
277277
///
278-
/// See the safe version, [`from_utf8()`][fromutf8], for more.
278+
/// See the safe version, [`from_utf8()`][fromutf8], for more information.
279279
///
280280
/// [fromutf8]: fn.from_utf8.html
281281
///

0 commit comments

Comments
 (0)