about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-18 18:14:52 +0000
committerbors <bors@rust-lang.org>2018-10-18 18:14:52 +0000
commite7f5d48059aa14cc2808473564deadd72d1e818d (patch)
tree1c4617a4299b50a733a99d3d5c045470aad8f99d /src/libsyntax/parse/parser.rs
parent121320d5236b255049ef178669b5a279389cd1e5 (diff)
parentd088edc5310518f740df973b6f85d078684152f6 (diff)
downloadrust-e7f5d48059aa14cc2808473564deadd72d1e818d.tar.gz
rust-e7f5d48059aa14cc2808473564deadd72d1e818d.zip
Auto merge of #54976 - davidtwco:issue-52663-special-case-closures, r=nikomatsakis
NLL lacks various special case handling of closures

Part of #52663.

Firstly, this PR extends existing handling of closures to also support generators.

Second, this PR adds the note found in the AST when a closure is invoked twice and captures a variable by-value:

```text
note: closure cannot be invoked more than once because it moves the variable `dict` out of its environment
  --> $DIR/issue-42065.rs:16:29
   |
LL |         for (key, value) in dict {
   |                             ^^^^
```

r? @nikomatsakis
cc @pnkfelix
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions