rust/library
bors cebd2dda1d Auto merge of #90352 - camsteffen:for-loop-desugar, r=oli-obk
Simplify `for` loop desugar

Basically two intermediate bindings are inlined. I could have left one intermediate binding in place as this would simplify some diagnostic logic, but I think the difference in that regard would be negligible, so it is better to have a minimal HIR.

For checking that the pattern is irrefutable, I added a special case when the `match` is found to be non-exhaustive.

The reordering of the arms is purely stylistic. I don't *think* there are any perf implications.

```diff
  match IntoIterator::into_iter($head) {
      mut iter => {
          $label: loop {
-             let mut __next;
              match Iterator::next(&mut iter) {
-                 Some(val) => __next = val,
                  None => break,
+                 Some($pat) => $block,
              }
-             let $pat = __next;
-             $block
          }
      }
  }
```
2021-11-21 21:20:20 +00:00
..
alloc Rollup merge of #89741 - sdroege:arc-rc-from-inner-unsafe, r=Mark-Simulacrum 2021-11-20 22:33:48 +01:00
backtrace@b02ed04a7e Updated backtrace submodule 2021-11-02 12:31:34 +01:00
core libcore: assume the input of next_code_point and next_code_point_reverse is UTF-8-like 2021-11-21 17:05:55 +01:00
panic_abort Use target_family = "wasm" 2021-11-10 08:35:42 -08:00
panic_unwind Review comments 2021-11-10 08:35:42 -08:00
portable-simd Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99' 2021-11-12 16:58:25 -08:00
proc_macro proc_macro: Add an expand_expr method to TokenStream 2021-11-12 15:41:40 -05:00
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #90352 - camsteffen:for-loop-desugar, r=oli-obk 2021-11-21 21:20:20 +00:00
stdarch@cfba59fccd Update stdarch 2021-11-19 11:20:42 -08:00
test Update more rustc/libtest things for wasm64 2021-11-10 08:35:42 -08:00
unwind Repace use of static_nobundle with native_link_modifiers 2021-10-23 15:51:22 +02:00