Closed
Description
Using generator and nll, one can create an object that point to itself, and then move it.
example outputing garbadge: https://play.rust-lang.org/?gist=ae6ddabbc8ddc411dcedd3fc48a8ee28&version=nightly
Reddit discution: https://www.reddit.com/r/rust/comments/7qwe76/self_borrowing_struct_and_generators/
As pointed by a redditor, #47353 point that @nikomatsakis know there is borrowing issues. Here is an example of such a problematic case.