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.
has_iter_method
1 parent b3fadd5 commit 1f8ba33Copy full SHA for 1f8ba33
clippy_utils/src/ty/mod.rs
@@ -171,7 +171,7 @@ pub fn should_call_clone_as_function(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
171
)
172
}
173
174
-/// Returns true if ty has `iter` or `iter_mut` methods
+/// If `ty` is known to have a `iter` or `iter_mut` method, returns a symbol representing the type.
175
pub fn has_iter_method(cx: &LateContext<'_>, probably_ref_ty: Ty<'_>) -> Option<Symbol> {
176
// FIXME: instead of this hard-coded list, we should check if `<adt>::iter`
177
// exists and has the desired signature. Unfortunately FnCtxt is not exported
0 commit comments