diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-04-26 03:50:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-26 03:50:18 +0200 |
| commit | 7560c158f684e978654f7dea81eebaf1e53bf653 (patch) | |
| tree | b3219d55821f4b338746b47425be012edc942151 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 77c5f557cced458d0f70f25c8ab5de02fac86188 (diff) | |
| parent | 4bd36ab64cae41e89d53113f683d790210846c1f (diff) | |
| download | rust-7560c158f684e978654f7dea81eebaf1e53bf653.tar.gz rust-7560c158f684e978654f7dea81eebaf1e53bf653.zip | |
Rollup merge of #60225 - Centril:hir-exprkind-use-in-for-loops, r=oli-obk
Introduce hir::ExprKind::Use and employ in for loop desugaring.
In the `for $pat in $expr $block` desugaring we end with a `{ let _result = $match_expr; _result }` construct which makes `for` loops into a terminating scope and affects drop order. The construct was introduced in year 2015 by @pnkfelix in https://github.com/rust-lang/rust/pull/21984.
This PR replaces the construct with `hir::ExprKind::Use(P<hir::Expr>)` which is equivalent semantically but should hopefully be less costly in terms of compile time performance (to be determined).
This is extracted out of https://github.com/rust-lang/rust/pull/59288/commits/91b0abdfb23f980d2e5d5c30bc65ed8e95b04788 from https://github.com/rust-lang/rust/pull/59288 for easier review and so that the perf implications wrt. `for`-loops can be measured.
r? @oli-obk
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
