Skip to content

Commit

Permalink
config.usize_ty -> config.ptr_width
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Nov 27, 2019
1 parent 7364648 commit 40c91ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/trivially_copy_pass_by_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub struct TriviallyCopyPassByRef {
impl<'a, 'tcx> TriviallyCopyPassByRef {
pub fn new(limit: Option<u64>, target: &SessionConfig) -> Self {
let limit = limit.unwrap_or_else(|| {
let bit_width = target.usize_ty.bit_width().expect("usize should have a width") as u64;
let bit_width = u64::from(target.ptr_width);
// Cap the calculated bit width at 32-bits to reduce
// portability problems between 32 and 64-bit targets
let bit_width = cmp::min(bit_width, 32);
Expand Down

0 comments on commit 40c91ec

Please sign in to comment.