We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b520b4c commit ef05061Copy full SHA for ef05061
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 = target.ptr_width as u64;
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