1
Fork 0

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.

These functions were added to all preludes in Rust 1.80.
This commit is contained in:
Thalia Archibald 2025-03-04 20:28:38 -08:00
parent ac951d3799
commit 38fad984c6
30 changed files with 64 additions and 74 deletions

View file

@ -2994,7 +2994,7 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
}
// HACK(min_const_generics, generic_const_exprs): We
// want to keep allowing `[0; std::mem::size_of::<*mut T>()]`
// want to keep allowing `[0; size_of::<*mut T>()]`
// with a future compat lint for now. We do this by adding an
// additional special case for repeat expressions.
//