This code already compiles on nightly with NLL enabled: https://play.rust-lang.org/?gist=f3ac5a92cf604f2b1717f731817ca140&version=nightly&mode=debug&edition=2015
Here’s the NLL tracking issue. Stabilizing NLL is part of the plan for the Rust 2018 edition.