1 use super::ITER_NEXT_LOOP;
2 use clippy_utils::diagnostics::span_lint;
3 use clippy_utils::is_trait_method;
5 use rustc_lint::LateContext;
8 pub(super) fn check(cx: &LateContext<'_>, arg: &Expr<'_>, expr: &Expr<'_>) -> bool {
9 if is_trait_method(cx, arg, sym::Iterator) {
14 "you are iterating over `Iterator::next()` which is an Option; this will compile but is \
15 probably not what you want",