Skip to content

Commit

Permalink
Remove redundant imports of size_of
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Mar 28, 2024
1 parent bfa36cd commit f32ef68
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/query/erase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::traits;
use crate::ty::adjustment::CoerceUnsizedInfo;
use crate::ty::{self, Ty};
use std::intrinsics::transmute_unchecked;
use std::mem::{size_of, MaybeUninit};
use std::mem::MaybeUninit;

#[derive(Copy, Clone)]
pub struct Erased<T: Copy> {
Expand Down
1 change: 0 additions & 1 deletion library/proc_macro/src/bridge/fxhash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use std::collections::HashMap;
use std::hash::BuildHasherDefault;
use std::hash::Hasher;
use std::mem::size_of;
use std::ops::BitXor;

/// Type alias for a hashmap using the `fx` hash algorithm.
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/io/error/repr_bitpacked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

use super::{Custom, ErrorData, ErrorKind, RawOsError, SimpleMessage};
use core::marker::PhantomData;
use core::mem::{align_of, size_of};
use core::mem::align_of;
use core::ptr::{self, NonNull};

// The 2 least-significant bits are used as tag.
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/unix/net/ancillary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use super::{sockaddr_un, SocketAddr};
use crate::io::{self, IoSlice, IoSliceMut};
use crate::marker::PhantomData;
use crate::mem::{size_of, zeroed};
use crate::mem::zeroed;
use crate::os::unix::io::RawFd;
use crate::path::Path;
use crate::ptr::{eq, read_unaligned};
Expand Down

0 comments on commit f32ef68

Please sign in to comment.