Closed QuietMisdreavus closed 6 years ago
Hmm I've never used the turbofish in this context before! Do you think this is common enough to work into the generics chapter @steveklabnik ? Or potentially somewhere more advanced?
See also #479
I am of the opinion that this use of turbofish isn't common enough to merit inclusion in chapter 10. Thank you for the feedback though!
The beloved turbofish is a bit of a hidden gem in terms of Rust syntax. Right now it's only mentioned next to the discussion of
collect
, in v1 as part of the Iterators chapter and a little more concisely in the documentation for collect itself. But this leaves out an important feature of it: you can keep going in a path when you add a turbofish. This caused confusion for someone today in #rust-beginners, so it'd be nice to have a discussion of this syntax next to generics, where I'd expect to see it a little more than just surrounding collect.