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:
parent
ac951d3799
commit
38fad984c6
30 changed files with 64 additions and 74 deletions
|
@ -619,7 +619,7 @@ impl Iterator for TokenTypeSetIter {
|
|||
type Item = TokenType;
|
||||
|
||||
fn next(&mut self) -> Option<TokenType> {
|
||||
let num_bits: u32 = (std::mem::size_of_val(&self.0.0) * 8) as u32;
|
||||
let num_bits: u32 = (size_of_val(&self.0.0) * 8) as u32;
|
||||
assert_eq!(num_bits, 128);
|
||||
let z = self.0.0.trailing_zeros();
|
||||
if z == num_bits {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue