declare_lint_pass!(CopyIterator => [COPY_ITERATOR]);
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyIterator {
- fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
+impl<'tcx> LateLintPass<'tcx> for CopyIterator {
+ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
if let ItemKind::Impl {
of_trait: Some(ref trait_ref),
..
COPY_ITERATOR,
item.span,
"you are implementing `Iterator` on a `Copy` type",
- item.span,
+ None,
"consider implementing `IntoIterator` instead",
);
}