GAT: elided lifetimes in paths errors with error[E0107]: missing generics for associated type
#81862
Labels
A-GATs
Area: Generic associated types (GATs)
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
requires-nightly
This issue requires a nightly compiler in some way.
Expectation from the rfc:
Instead, this happened:
If we follow the diagnostic and change it to
It will error with the following:
If we follow only the suggestion of
fn next<'a>(&mut self) -> Option<Self::Item<'a>>
or instead enable the in-band lifetime feature, then it will compile.An alternative to the compiler suggestions would be to use a placeholder lifetime,
which is the preferred style over elided lifetimes in paths today.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: