1
Fork 0

Fix has_iter_method documentation (#13867)

changelog: none
This commit is contained in:
Timo 2024-12-23 02:21:16 +00:00 committed by GitHub
commit 592fd34c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -171,7 +171,7 @@ pub fn should_call_clone_as_function(cx: &LateContext<'_>, ty: Ty<'_>) -> bool {
)
}
/// 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.
pub fn has_iter_method(cx: &LateContext<'_>, probably_ref_ty: Ty<'_>) -> Option<Symbol> {
// FIXME: instead of this hard-coded list, we should check if `<adt>::iter`
// exists and has the desired signature. Unfortunately FnCtxt is not exported