rust/src/tools
bors 59bb9505bc Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJung
Allow partially moved values in match

This PR attempts to unify the behaviour between `let _ = PLACE`, `let _: TY = PLACE;` and `match PLACE { _ => {} }`.
The logical conclusion is that the `match` version should not check for uninitialised places nor check that borrows are still live.

The `match PLACE {}` case is handled by keeping a `FakeRead` in the unreachable fallback case to verify that `PLACE` has a legal value.

Schematically, `match PLACE { arms }` in surface rust becomes in MIR:
```rust
PlaceMention(PLACE)
match PLACE {
  // Decision tree for the explicit arms
  arms,
  // An extra fallback arm
  _ => {
    FakeRead(ForMatchedPlace, PLACE);
    unreachable
  }
}
```

`match *borrow { _ => {} }` continues to check that `*borrow` is live, but does not read the value.
`match *borrow {}` both checks that `*borrow` is live, and fake-reads the value.

Continuation of ~https://github.com/rust-lang/rust/pull/102256~ ~https://github.com/rust-lang/rust/pull/104844~

Fixes https://github.com/rust-lang/rust/issues/99180 https://github.com/rust-lang/rust/issues/53114
2023-10-27 18:51:43 +00:00
..
build-manifest add target csky-unknown-linux-gnuabiv2hf 2023-10-22 21:20:30 +08:00
build_helper Rollup merge of #114453 - Kobzol:ci-group-stdout, r=onur-ozkan 2023-10-02 16:09:41 -04:00
bump-stage0 Upgrade to indexmap 2.0.0 2023-07-03 13:51:54 -07:00
cargo@df35092379 Update cargo 2023-10-24 20:51:13 -04:00
cargotest
clippy Auto merge of #117148 - dtolnay:sinceversion, r=cjgillot 2023-10-26 06:59:19 +00:00
collect-license-metadata Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
compiletest compiletest: Display compilation errors in mir-opt tests 2023-10-25 15:16:43 +02:00
coverage-dump Add tool src/tools/coverage-dump for use by some new coverage tests 2023-09-05 11:11:48 +10:00
error_index_generator Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
expand-yaml-anchors
generate-copyright
generate-windows-sys Update windows ffi bindings 2023-08-28 20:12:00 +01:00
html-checker
jsondocck Allow to have - in the rustdoc-json test file name 2023-07-12 10:45:49 +02:00
jsondoclint rustdoc: Rename typedef to type alias in jsondoclint 2023-08-23 11:47:35 -07:00
linkchecker linkchecker: Remove unneeded FIXME about intra-doc links 2023-08-06 13:28:43 +02:00
lint-docs Revert "Fix x test lint-docs when download-rustc is enabled" 2023-07-11 22:30:28 -05:00
lld-wrapper linker: Remove -Zgcc-ld option 2023-10-08 10:05:25 +03:00
miri Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJung 2023-10-27 18:51:43 +00:00
miropt-test-tools Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
opt-dist Partial Revert: "Auto merge of #117018 - Kobzol:opt-dist-cargo-stage0" 2023-10-23 16:10:52 +02:00
remote-test-client
remote-test-server
replace-version-placeholder
rls Don't use serde-derive in the rls shim 2023-07-10 14:53:57 -07:00
rust-analyzer use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
rust-demangler
rust-installer rust-installer: Use env(1) in the shebang. 2023-07-21 17:55:49 -07:00
rustbook
rustdoc
rustdoc-gui Improve display of parallel jobs in rustdoc-gui tester script 2023-10-16 20:16:08 +02:00
rustdoc-gui-test Make try_run return a Result<(), ()> instead of a boolean 2023-06-23 17:07:34 +02:00
rustdoc-js rustdoc: fix test case for generics that look like names 2023-09-03 13:06:08 -07:00
rustdoc-themes Ensure build/tmp exists in rustdoc_themes::get_themes 2023-09-20 08:31:33 +02:00
rustfmt Auto merge of #116033 - bvanjoi:fix-116032, r=petrochenkov 2023-10-23 20:24:09 +00:00
suggest-tests
tidy coverage: Add UI tests for values accepted by -Cinstrument-coverage 2023-10-23 17:41:40 +11:00
tier-check
unicode-table-generator
unstable-book-gen
x
cherry-pick.sh
publish_toolstate.py