]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #55494 - pnkfelix:issue-55492-borrowck-migrate-must-look-at-parents...
authorkennytm <kennytm@gmail.com>
Tue, 30 Oct 2018 10:55:37 +0000 (18:55 +0800)
committerGitHub <noreply@github.com>
Tue, 30 Oct 2018 10:55:37 +0000 (18:55 +0800)
commit93f84e558681df7c160d4673f69a07978ca6f955
tree155b922fd3bd98fc0e6c54203e135280425a030f
parent50b8879bcfa77f8b615dcee9d48e3b5dacbf7fd0
parent87ce5ec6e955849189887e56dfafc45e1293f63f
Rollup merge of #55494 - pnkfelix:issue-55492-borrowck-migrate-must-look-at-parents-of-closures, r=davidtwco

borrowck=migrate must look at parents of closures

This fixes the NLL migration mode (which is the default with edition=2018) to inspect all parents of a closure in addition to the closure itself when looking to see if AST-borrowck issues an error for the given code.

This should be a candidate for beta backport.

Fix #55492
src/librustc_mir/borrow_check/mod.rs