Conversation
Can any #Rust expert out there explain where is the syntax for this little challenge documented?

https://github.com/mainmatter/100-exercises-to-learn-rust/issues/245

(preferably with explanations about what the different lifetime annotations mean)
2
1
2

@buherator GATs is what you probably want here. There is a small book by the GAT initiative, it is the only place I could find which explains them https://rust-lang.github.io/generic-associated-types-initiative/explainer/iterable.html. Iirc it’s also explained in Rust for Rustaceans which is really good

1
1
1

@turbocooler @buherator see also the first video in the excellent crust of rust series https://www.youtube.com/playlist?list=PLqbS7AVVErFiWDOAVrPt7aYmnuuOLYvOa

Yeah, this is me recommending a video 😱

0
1
1

@buherator Ignoring your question for a second, I filed https://github.com/rust-lang/rust/issues/135589 to add more context to the error and error index entry corresponding to these cases. As the sister comment mentioned, lifetimes on associated items are new(er than The Book) so they are not as well introduced in the documentation.

1
0
1
@ekuber you are awesome, thank you! I'm sure your ticket will also help me better understand the situation.
1
0
1
@ekuber Wow, this would've made the exercise almost too easy! :D I wanted to make a comment about E207 but I see you already fixed that one too. My trust in the Rust community just increased a lot (not that I had any bad experiences so far)!
0
0
1