Skip to content

Commit d8b4269

Browse files
Merge #3411
3411: rustup #55665 (pass contexts by reference) r=matthiaskrgr a=matthiaskrgr Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2 parents a07c271 + 3967016 commit d8b4269

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/utils/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ pub fn get_arg_name(pat: &Pat) -> Option<ast::Name> {
10161016
}
10171017

10181018
pub fn int_bits(tcx: TyCtxt<'_, '_, '_>, ity: ast::IntTy) -> u64 {
1019-
layout::Integer::from_attr(tcx, attr::IntType::SignedInt(ity)).size().bits()
1019+
layout::Integer::from_attr(&tcx, attr::IntType::SignedInt(ity)).size().bits()
10201020
}
10211021

10221022
#[allow(clippy::cast_possible_wrap)]
@@ -1035,7 +1035,7 @@ pub fn unsext(tcx: TyCtxt<'_, '_, '_>, u: i128, ity: ast::IntTy) -> u128 {
10351035

10361036
/// clip unused bytes
10371037
pub fn clip(tcx: TyCtxt<'_, '_, '_>, u: u128, ity: ast::UintTy) -> u128 {
1038-
let bits = layout::Integer::from_attr(tcx, attr::IntType::UnsignedInt(ity)).size().bits();
1038+
let bits = layout::Integer::from_attr(&tcx, attr::IntType::UnsignedInt(ity)).size().bits();
10391039
let amt = 128 - bits;
10401040
(u << amt) >> amt
10411041
}

0 commit comments

Comments
 (0)