about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-27 23:01:10 +0200
committerGitHub <noreply@github.com>2019-06-27 23:01:10 +0200
commit274c3de16859ce03ae82d3468b551285991a88fc (patch)
treebd3f1bf5aafcbcafbf04c43922511711c88b5c9d /src/rustllvm/RustWrapper.cpp
parent4aa3e27231a705e1aea4347ae78698c81438f1f4 (diff)
parent5cb841d72e70f92fc4318833db4824d07ab4c911 (diff)
downloadrust-274c3de16859ce03ae82d3468b551285991a88fc.tar.gz
rust-274c3de16859ce03ae82d3468b551285991a88fc.zip
Rollup merge of #62152 - doctorn:async_let_ice, r=cramertj
Don't ICE on item in `.await` expression

The code for lowering a `.await` expression missed that item IDs may already have been assigned for items inside of an `async` block, or for closures. This change means we no longer exit early after finding a `.await` in a block that isn't `async` and instead just emit the error. This avoids an ICE generated due to item IDs not being densely generated. (The `YieldSource` of the generated `yield` expression is  used to avoid errors generated about having `yield` expressions outside of generator literals.)

r? @cramertj

Resolves #62009 and resolves #61685
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions