Open shika-blyat opened 4 years ago
hmm yea, i think the new borrowchecker and/or some new sugar was added since this section was written which makes this not actually a good example anymore. Will have to think...
There should probably be some kind of disclaimer, explaining that the example(and the whole subchapterl) is outdated no ? I can make a PR for that
https://doc.rust-lang.org/nomicon/hrtb.html I was wondering about why the HRTB were needed here, so i tried to implement this myself, by specifying manually the lifetime, and well, it worked: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=7f8c86e91966c70165c1989f9034b4ef
I believe this is either a mistake (the given example doesn't require HRTB) or the explanation is unclear, in which case this issue should be considered as a request to rephrase it.