You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty sure this bug is somehow related to the impl trait feature as I was implementing a fn that returns an impl std::iter::Iterator<Item=&Node> for some struct Node. It also seems related to lifetime elision rules, as that is the differentiating factor.
Interestingly, this compiles:
/// Return a left-to-right iterator over this `Node`'s childrenpubfnchild_iter_left<'l>(&'l self) -> impl std::iter::Iterator<Item = &'l Node>{self.children_ref().iter()}
While this does not:
/// Return a left-to-right iterator over this `Node`'s childrenpubfnchild_iter_left(&self) -> impl std::iter::Iterator<Item = &Node>{self.children_ref().iter()}
In fact, when I compile using the latter form, I get an ICE:
I'm pretty sure this bug is somehow related to the
impl trait
feature as I was implementing a fn that returns animpl std::iter::Iterator<Item=&Node>
for some structNode
. It also seems related to lifetime elision rules, as that is the differentiating factor.Interestingly, this compiles:
While this does not:
In fact, when I compile using the latter form, I get an ICE:
The text was updated successfully, but these errors were encountered: