rust/src
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
..
bootstrap Rollup merge of #90800 - aplanas:fix_cargo_config, r=Mark-Simulacrum 2021-11-19 13:06:35 +09:00
build_helper
ci Rollup merge of #90733 - wesleywiser:musl_debuginfo, r=Mark-Simulacrum 2021-11-16 23:58:21 +01:00
doc Put back removed empty line 2021-11-19 10:20:49 +01:00
etc
librustdoc Auto merge of #90844 - camelid:cleanup-vis, r=jyn514 2021-11-21 13:26:31 +00:00
llvm-project@f9b03d0e2d Update llvm submodule 2021-11-16 16:49:16 +00:00
rustdoc-json-types Moved format-version constant to rustdoc-json-types 2021-10-15 12:27:42 +03:00
test Bless coverage tests 2021-11-21 14:55:36 -06:00
tools clippy: Fix pattern_type_mismatch for loop 2021-11-21 08:16:20 -06:00
README.md
stage0.json bump boostrap compiler 2021-10-23 21:55:57 -04:00
version bump version to rust 1.58.0 2021-10-17 16:04:44 +02:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.