about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-14 19:26:17 +0100
committerGitHub <noreply@github.com>2022-11-14 19:26:17 +0100
commit43bb507d128dc1ea0618ee678245c6bdab561dcf (patch)
tree38873b2e78dacacab4e9f4f3b2c257594e944aa2
parentf8e5b1ce9edc94bc2d242a399cf2759e2e2a5c42 (diff)
parentd8c0fef18822ae64623ff5ccfe1a0f9661569b0c (diff)
downloadrust-43bb507d128dc1ea0618ee678245c6bdab561dcf.tar.gz
rust-43bb507d128dc1ea0618ee678245c6bdab561dcf.zip
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.
-rw-r--r--library/core/src/mem/maybe_uninit.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs
index 7757c95de9d..3f491836551 100644
--- a/library/core/src/mem/maybe_uninit.rs
+++ b/library/core/src/mem/maybe_uninit.rs
@@ -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") {