iter_without_into_iter
suggests doubly incorrect IntoIter
type
#14004
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Summary
When suggesting an implementation of
IntoIterator
,iter_without_into_iter
suggests using a type forIntoIter
which has two problems:crate::
, making it invalid if we happen to be in a module.Reproducer
I tried this code:
The suggestion is:
inner::I<'_>
is invalid, because of the lifetime, and because it should be eitherI
orcrate::inner::I
.Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: