about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-11-04 22:47:20 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2018-11-04 22:47:20 +0100
commit396701613e644905fac904c28678d64a813f80a6 (patch)
treefb6f904caaa0e9a845d1d767f41a979e8071c2c4
parenta07c2715594b17fca900c6c4a497c8fb6abde609 (diff)
downloadrust-396701613e644905fac904c28678d64a813f80a6.tar.gz
rust-396701613e644905fac904c28678d64a813f80a6.zip
rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)
-rw-r--r--clippy_lints/src/utils/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs
index 1cd20b68421..ad91acbcbfd 100644
--- a/clippy_lints/src/utils/mod.rs
+++ b/clippy_lints/src/utils/mod.rs
@@ -1016,7 +1016,7 @@ pub fn get_arg_name(pat: &Pat) -> Option<ast::Name> {
 }
 
 pub fn int_bits(tcx: TyCtxt<'_, '_, '_>, ity: ast::IntTy) -> u64 {
-    layout::Integer::from_attr(tcx, attr::IntType::SignedInt(ity)).size().bits()
+    layout::Integer::from_attr(&tcx, attr::IntType::SignedInt(ity)).size().bits()
 }
 
 #[allow(clippy::cast_possible_wrap)]
@@ -1035,7 +1035,7 @@ pub fn unsext(tcx: TyCtxt<'_, '_, '_>, u: i128, ity: ast::IntTy) -> u128 {
 
 /// clip unused bytes
 pub fn clip(tcx: TyCtxt<'_, '_, '_>, u: u128, ity: ast::UintTy) -> u128 {
-    let bits = layout::Integer::from_attr(tcx, attr::IntType::UnsignedInt(ity)).size().bits();
+    let bits = layout::Integer::from_attr(&tcx, attr::IntType::UnsignedInt(ity)).size().bits();
     let amt = 128 - bits;
     (u << amt) >> amt
 }