rust/src
Dylan DPC 48c5e0c262
Rollup merge of #103034 - nathanwhit:let-chains-rhs-temporaries, r=wesleywiser
Let expressions on RHS shouldn't be terminating scopes

Fixes #100276.

Before this PR, we were unconditionally marking the RHS of short-circuiting binary expressions as a terminating scope.

In the case of a let chain where the `let` expression was on the RHS, this meant that temporaries within the `let` expr would only live until the end of the expression. Since this only affected the RHS, this led to surprising behavior ([example](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d1b0a5d1f01882f9c89c2194a75eb19f)).

After this PR, we only mark the RHS as a terminating scope if it is not a `let` expression.
2022-10-19 14:05:52 +05:30
..
bootstrap
ci
doc
etc
librustdoc Auto merge of #103213 - matthiaskrgr:rollup-diloxg3, r=matthiaskrgr 2022-10-19 02:53:24 +00:00
llvm-project@9567f08afc
rustdoc-json-types
test Rollup merge of #103034 - nathanwhit:let-chains-rhs-temporaries, r=wesleywiser 2022-10-19 14:05:52 +05:30
tools Auto merge of #103225 - matthiaskrgr:rollup-1zkv87y, r=matthiaskrgr 2022-10-19 05:41:14 +00:00
README.md
stage0.json
version

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

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

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