We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7364648 commit 40c91ecCopy full SHA for 40c91ec
clippy_lints/src/trivially_copy_pass_by_ref.rs
@@ -62,7 +62,7 @@ pub struct TriviallyCopyPassByRef {
62
impl<'a, 'tcx> TriviallyCopyPassByRef {
63
pub fn new(limit: Option<u64>, target: &SessionConfig) -> Self {
64
let limit = limit.unwrap_or_else(|| {
65
- let bit_width = target.usize_ty.bit_width().expect("usize should have a width") as u64;
+ let bit_width = u64::from(target.ptr_width);
66
// Cap the calculated bit width at 32-bits to reduce
67
// portability problems between 32 and 64-bit targets
68
let bit_width = cmp::min(bit_width, 32);
0 commit comments