Rollup merge of #104332 - Elarcis:maybe_uninit_doc_fix, r=m-ou-se
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.
This commit is contained in:
commit
43bb507d12
@ -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) };
|
||||
@ -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") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user