Skip to content

Commit c9ea4f5

Browse files
authored
Unrolled build for #152439
Rollup merge of #152439 - him2him2:fix-typos-libs, r=clarfonthey Fix typos and grammar in library documentation Fix contextual typos and grammar issues in library docs that automated spellcheckers miss: - `library/core/src/macros/panic.md`: remove duplicate word ("another other" → "another") - `library/core/src/error.md`: fix spacing ("Often times" → "Oftentimes") - `library/core/src/ptr/docs/as_ref.md`: fix wrong types in Null-unchecked section (`&mut T` → `&T`) - `library/core/src/ffi/c_ulong.md`: fix article ("an `u64`" → "a `u64`") - `library/core/src/ffi/c_void.md`: fix plural ("compiler" → "compilers") - `library/core/src/ptr/docs/as_uninit_slice.md`: fix subject-verb agreement ("is true" → "are true") - `library/std_detect/README.md`: fix article ("an user-space" → "a user-space") No functional changes.
2 parents fdbd8ee + 1a43039 commit c9ea4f5

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

library/core/src/error.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ responsibilities they cover:
3434

3535
## Converting Errors into Panics
3636

37-
The panic and error systems are not entirely distinct. Often times errors
37+
The panic and error systems are not entirely distinct. Oftentimes errors
3838
that are anticipated runtime failures in an API might instead represent bugs
3939
to a caller. For these situations the standard library provides APIs for
4040
constructing panics with an `Error` as its source.

library/core/src/ffi/c_ulong.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Equivalent to C's `unsigned long` type.
22

3-
This type will always be [`u32`] or [`u64`]. Most notably, many Linux-based systems assume an `u64`, but Windows assumes `u32`. The C standard technically only requires that this type be an unsigned integer with the size of a [`long`], although in practice, no system would have a `ulong` that is neither a `u32` nor `u64`.
3+
This type will always be [`u32`] or [`u64`]. Most notably, many Linux-based systems assume a `u64`, but Windows assumes `u32`. The C standard technically only requires that this type be an unsigned integer with the size of a [`long`], although in practice, no system would have a `ulong` that is neither a `u32` nor `u64`.
44

55
[`long`]: c_long

library/core/src/ffi/c_void.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ stabilized, it is recommended to use a newtype wrapper around an empty
99
byte array. See the [Nomicon] for details.
1010

1111
One could use `std::os::raw::c_void` if they want to support old Rust
12-
compiler down to 1.1.0. After Rust 1.30.0, it was re-exported by
12+
compilers down to 1.1.0. After Rust 1.30.0, it was re-exported by
1313
this definition. For more information, please read [RFC 2521].
1414

1515
[Nomicon]: https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs

library/core/src/macros/panic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ call. You can override the panic hook using [`std::panic::set_hook()`].
1919
Inside the hook a panic can be accessed as a `&dyn Any + Send`,
2020
which contains either a `&str` or `String` for regular `panic!()` invocations.
2121
(Whether a particular invocation contains the payload at type `&str` or `String` is unspecified and can change.)
22-
To panic with a value of another other type, [`panic_any`] can be used.
22+
To panic with a value of another type, [`panic_any`] can be used.
2323

2424
See also the macro [`compile_error!`], for raising errors during compilation.
2525

library/core/src/ptr/docs/as_ref.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ determined to be null or not. See [`is_null`] for more information.
1616
# Null-unchecked version
1717

1818
If you are sure the pointer can never be null, you can use `as_ref_unchecked` which returns
19-
`&mut T` instead of `Option<&mut T>`.
19+
`&T` instead of `Option<&T>`.

library/core/src/ptr/docs/as_uninit_slice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ that the value has to be initialized.
77
# Safety
88

99
When calling this method, you have to ensure that *either* the pointer is null *or*
10-
all of the following is true:
10+
all of the following are true:
1111

1212
* The pointer must be [valid] for reads for `ptr.len() * size_of::<T>()` many bytes,
1313
and it must be properly aligned. This means in particular:

library/std_detect/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ regard to better serve the needs of `#[no_std]` targets.
2525

2626
* All `x86`/`x86_64` targets are supported on all platforms by querying the
2727
`cpuid` instruction directly for the features supported by the hardware and
28-
the operating system. `std_detect` assumes that the binary is an user-space
28+
the operating system. `std_detect` assumes that the binary is a user-space
2929
application.
3030

3131
* Linux/Android:

0 commit comments

Comments
 (0)