Skip to content

Commit

Permalink
Rollup merge of #104332 - Elarcis:maybe_uninit_doc_fix, r=m-ou-se
Browse files Browse the repository at this point in the history
Fixed some `_i32` notation in `maybe_uninit`’s doc

This PR just changed two lines in the documentation for `MaybeUninit`:

```rs
let val = 0x12345678i32;
```
was changed to:
```rs
let val = 0x12345678_i32;
```
in two doctests, making the values a tad easier to read.

It does not seem like there are other literals needing this change in the file.
  • Loading branch information
matthiaskrgr authored Nov 14, 2022
2 parents f8e5b1c + d8c0fef commit 43bb507
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ impl<T> MaybeUninit<T> {
/// #![feature(maybe_uninit_as_bytes, maybe_uninit_slice)]
/// use std::mem::MaybeUninit;
///
/// let val = 0x12345678i32;
/// let val = 0x12345678_i32;
/// let uninit = MaybeUninit::new(val);
/// let uninit_bytes = uninit.as_bytes();
/// let bytes = unsafe { MaybeUninit::slice_assume_init_ref(uninit_bytes) };
Expand All @@ -1198,7 +1198,7 @@ impl<T> MaybeUninit<T> {
/// #![feature(maybe_uninit_as_bytes)]
/// use std::mem::MaybeUninit;
///
/// let val = 0x12345678i32;
/// let val = 0x12345678_i32;
/// let mut uninit = MaybeUninit::new(val);
/// let uninit_bytes = uninit.as_bytes_mut();
/// if cfg!(target_endian = "little") {
Expand Down

0 comments on commit 43bb507

Please sign in to comment.