Skip to content

Commit 7866144

Browse files
authored
Rollup merge of rust-lang#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.
2 parents daec149 + d8c0fef commit 7866144

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/mem/maybe_uninit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ impl<T> MaybeUninit<T> {
11721172
/// #![feature(maybe_uninit_as_bytes, maybe_uninit_slice)]
11731173
/// use std::mem::MaybeUninit;
11741174
///
1175-
/// let val = 0x12345678i32;
1175+
/// let val = 0x12345678_i32;
11761176
/// let uninit = MaybeUninit::new(val);
11771177
/// let uninit_bytes = uninit.as_bytes();
11781178
/// let bytes = unsafe { MaybeUninit::slice_assume_init_ref(uninit_bytes) };
@@ -1198,7 +1198,7 @@ impl<T> MaybeUninit<T> {
11981198
/// #![feature(maybe_uninit_as_bytes)]
11991199
/// use std::mem::MaybeUninit;
12001200
///
1201-
/// let val = 0x12345678i32;
1201+
/// let val = 0x12345678_i32;
12021202
/// let mut uninit = MaybeUninit::new(val);
12031203
/// let uninit_bytes = uninit.as_bytes_mut();
12041204
/// if cfg!(target_endian = "little") {

0 commit comments

Comments
 (0)