diff options
| author | bors <bors@rust-lang.org> | 2025-03-07 13:47:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-07 13:47:27 +0000 |
| commit | 03eb45452305f2d52348279d0caa5fc1f12c438d (patch) | |
| tree | 74910a87bd9be174a8e61365a82c887cb84178e4 /library/core/src/char | |
| parent | 59a9b9e9d776cb5d6bc02e99c4dce4f94f622232 (diff) | |
| parent | acc7de6c77a9b08aab24d2a240f0e781ce5e5766 (diff) | |
Auto merge of #138155 - matthiaskrgr:rollup-xq5buio, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #137674 (Enable `f16` for LoongArch) - #138034 (library: Use `size_of` from the prelude instead of imported) - #138060 (Revert #138019 after further discussion about how hir-pretty printing should work) - #138073 (Break critical edges in inline asm before code generation) - #138107 (`librustdoc`: clippy fixes) - #138111 (Use `default_field_values` for `rustc_errors::Context`, `rustc_session::config::NextSolverConfig` and `rustc_session::config::ErrorOutputType`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/char')
| -rw-r--r-- | library/core/src/char/convert.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/library/core/src/char/convert.rs b/library/core/src/char/convert.rs index 73ab4f1e52a..ac808038f89 100644 --- a/library/core/src/char/convert.rs +++ b/library/core/src/char/convert.rs @@ -40,11 +40,9 @@ impl From<char> for u32 { /// # Examples /// /// ``` - /// use std::mem; - /// /// let c = 'c'; /// let u = u32::from(c); - /// assert!(4 == mem::size_of_val(&u)) + /// assert!(4 == size_of_val(&u)) /// ``` #[inline] fn from(c: char) -> Self { @@ -59,11 +57,9 @@ impl From<char> for u64 { /// # Examples /// /// ``` - /// use std::mem; - /// /// let c = '👤'; /// let u = u64::from(c); - /// assert!(8 == mem::size_of_val(&u)) + /// assert!(8 == size_of_val(&u)) /// ``` #[inline] fn from(c: char) -> Self { @@ -80,11 +76,9 @@ impl From<char> for u128 { /// # Examples /// /// ``` - /// use std::mem; - /// /// let c = '⚙'; /// let u = u128::from(c); - /// assert!(16 == mem::size_of_val(&u)) + /// assert!(16 == size_of_val(&u)) /// ``` #[inline] fn from(c: char) -> Self { @@ -167,11 +161,9 @@ impl From<u8> for char { /// # Examples /// /// ``` - /// use std::mem; - /// /// let u = 32 as u8; /// let c = char::from(u); - /// assert!(4 == mem::size_of_val(&c)) + /// assert!(4 == size_of_val(&c)) /// ``` #[inline] fn from(i: u8) -> Self { |
