rust/src/test
Jonas Schievink f66af28641
Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov
Make `_` an expression, to discard values in destructuring assignments

This is the third and final step towards implementing destructuring assignment (RFC: rust-lang/rfcs#2909, tracking issue: #71126). This PR is the third and final part of #71156, which was split up to allow for easier review.

With this PR, an underscore `_` is parsed as an expression but is allowed *only* on the left-hand side of a destructuring assignment. There it simply discards a value, similarly to the wildcard `_` in patterns. For instance,
```rust
(a, _) = (1, 2)
```
will simply assign 1 to `a` and discard the 2. Note that for consistency,
```
_ = foo
```
is also allowed and equivalent to just `foo`.

Thanks to ````@varkor```` who helped with the implementation, particularly around pre-expansion gating.

r? ````@petrochenkov````
2020-11-15 13:39:48 +01:00
..
assembly Add asm! support for mips64 2020-10-04 12:01:21 +00:00
auxiliary
codegen fully exploited the dropped support of LLVM 8 2020-11-12 14:39:47 +01:00
codegen-units simplify-locals: Remove unused assignments regardless of rvalue kind 2020-10-26 10:48:28 +01:00
compile-fail check mir exists before validation; fix tests 2020-11-12 21:08:18 +05:30
debuginfo BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values 2020-10-14 13:03:23 +02:00
incremental simplify-locals: Remove unused assignments regardless of rvalue kind 2020-10-26 10:48:28 +01:00
mir-opt Rollup merge of #78966 - tmiasko:inline-never, r=oli-obk 2020-11-15 03:02:48 +01:00
pretty fix pretty print for qpath 2020-11-12 12:47:25 +01:00
run-make Auto merge of #76256 - tgnottingham:issue-74890, r=nikomatsakis 2020-11-12 15:34:09 +00:00
run-make-fulldeps Fix and re-enable two coverage tests on MacOS 2020-11-11 22:54:58 -08:00
run-pass-valgrind Add unsized_fn_params feature 2020-10-27 14:45:02 -03:00
rustdoc Rollup merge of #78962 - poliorcetics:rustdoc-raw-ident-test, r=jyn514 2020-11-15 03:02:44 +01:00
rustdoc-js Add test for whitespace in doc alias 2020-10-05 16:37:13 +02:00
rustdoc-js-std
rustdoc-ui Rollup merge of #78984 - GuillaumeGomez:rustdoc-check-option, r=jyn514 2020-11-13 15:26:16 +01:00
rustfix
ui Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
ui-fulldeps Implement destructuring assignment for structs and slices 2020-11-11 12:10:52 +00:00
COMPILER_TESTS.md