Skip to content

Commit 40c91ec

Browse files
committed
config.usize_ty -> config.ptr_width
From http://github.com/rust-lang/rust/pull/66719
1 parent 7364648 commit 40c91ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/trivially_copy_pass_by_ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub struct TriviallyCopyPassByRef {
6262
impl<'a, 'tcx> TriviallyCopyPassByRef {
6363
pub fn new(limit: Option<u64>, target: &SessionConfig) -> Self {
6464
let limit = limit.unwrap_or_else(|| {
65-
let bit_width = target.usize_ty.bit_width().expect("usize should have a width") as u64;
65+
let bit_width = u64::from(target.ptr_width);
6666
// Cap the calculated bit width at 32-bits to reduce
6767
// portability problems between 32 and 64-bit targets
6868
let bit_width = cmp::min(bit_width, 32);

0 commit comments

Comments
 (0)