Skip to content

Commit a36707b

Browse files
committed
Appease clippy by not shadowing variables
1 parent 096c064 commit a36707b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ fn get_error_type<'a>(cx: &LateContext, ty: ty::Ty<'a>) -> Option<ty::Ty<'a>> {
154154
// conservative, i.e. it should not return false positives, but will return
155155
// false negatives.
156156
fn has_debug_impl<'a, 'b>(ty: ty::Ty<'a>, cx: &LateContext<'b, 'a>) -> bool {
157-
let ty = walk_ptrs_ty(ty);
157+
let no_ref_ty = walk_ptrs_ty(ty);
158158
let debug = match cx.tcx.lang_items.debug_trait() {
159159
Some(debug) => debug,
160160
None => return false
161161
};
162162
let debug_def = cx.tcx.lookup_trait_def(debug);
163163
let mut debug_impl_exists = false;
164-
debug_def.for_each_relevant_impl(cx.tcx, ty, |d| {
164+
debug_def.for_each_relevant_impl(cx.tcx, no_ref_ty, |d| {
165165
let self_ty = &cx.tcx.impl_trait_ref(d).and_then(|im| im.substs.self_ty());
166166
if let Some(self_ty) = *self_ty {
167167
if !self_ty.flags.get().contains(ty::TypeFlags::HAS_PARAMS) {

0 commit comments

Comments
 (0)