We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
use_self
1 parent 8eeb3fe commit d7ddb2aCopy full SHA for d7ddb2a
clippy_lints/src/use_self.rs
@@ -130,6 +130,10 @@ fn check_trait_method_impl_decl<'a, 'tcx: 'a>(
130
None
131
};
132
133
+ // `impl_decl_ty` (of type `hir::Ty`) represents the type declared in the signature.
134
+ // `impl_ty` (of type `ty:TyS`) is the concrete type that the compiler has determined for
135
+ // that declaration. We use `impl_decl_ty` to see if the type was declared as `Self`
136
+ // and use `impl_ty` to check its concrete type.
137
for (impl_decl_ty, (impl_ty, trait_ty)) in impl_decl.inputs.iter().chain(output_ty).zip(
138
impl_method_sig
139
.inputs_and_output
0 commit comments