diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-09 10:34:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-09 10:34:49 +0100 |
| commit | c6662879b27f5161e95f39395e3c9513a7b97028 (patch) | |
| tree | cf7958340ec0730f2b6b534700848fdeef0598c9 /compiler/rustc_errors/src | |
| parent | cdd97bae84aba172b38f307392b073fb331f0d7a (diff) | |
| parent | 38fad984c616cf4d10f653fa50c85cdc01083373 (diff) | |
| download | rust-c6662879b27f5161e95f39395e3c9513a7b97028.tar.gz rust-c6662879b27f5161e95f39395e3c9513a7b97028.zip | |
Rollup merge of #138040 - thaliaarchi:use-prelude-size-of.compiler, r=compiler-errors
compiler: Use `size_of` from the prelude instead of imported
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. Apply this change across the compiler.
These functions were added to all preludes in Rust 1.80.
r? ``@compiler-errors``
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 7fffeaddb86..9f4d2ea5c1a 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -490,7 +490,7 @@ pub struct Diag<'a, G: EmissionGuarantee = ErrorGuaranteed> { // would be bad. impl<G> !Clone for Diag<'_, G> {} -rustc_data_structures::static_assert_size!(Diag<'_, ()>, 3 * std::mem::size_of::<usize>()); +rustc_data_structures::static_assert_size!(Diag<'_, ()>, 3 * size_of::<usize>()); impl<G: EmissionGuarantee> Deref for Diag<'_, G> { type Target = DiagInner; |
