Skip to content

Commit 70b5888

Browse files
committed
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.
1 parent ab17806 commit 70b5888

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/builder.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,9 +2439,5 @@ fn get_maybe_pointer_size(value: RValue<'_>) -> u32 {
24392439
#[cfg(not(feature = "master"))]
24402440
fn get_maybe_pointer_size(value: RValue<'_>) -> u32 {
24412441
let type_ = value.get_type();
2442-
if type_.get_pointee().is_some() {
2443-
std::mem::size_of::<*const ()>() as _
2444-
} else {
2445-
type_.get_size()
2446-
}
2442+
if type_.get_pointee().is_some() { size_of::<*const ()>() as _ } else { type_.get_size() }
24472443
}

0 commit comments

Comments
 (0)