rust/tests
Esteban Küber a939bad513 Suggest turnging if let into irrefutable let if appropriate
When encountering an `if let` tail expression without an `else` arm for an
enum with a single variant, suggest writing an irrefutable `let` binding
instead.

```
error[E0317]: `if` may be missing an `else` clause
  --> $DIR/irrefutable-if-let-without-else.rs:8:5
   |
LL |   fn foo(x: Enum) -> i32 {
   |                      --- expected `i32` because of this return type
LL | /     if let Enum::Variant(value) = x {
LL | |         value
LL | |     }
   | |_____^ expected `i32`, found `()`
   |
   = note: `if` expressions without `else` evaluate to `()`
   = help: consider adding an `else` block that evaluates to the expected type
help: consider using an irrefutable `let` binding instead
   |
LL ~     let Enum::Variant(value) = x;
LL ~         value
   |
```

Fix #61788.
2024-02-06 03:53:06 +00:00
..
assembly Revert "Add the wasm32-wasi-preview2 target" 2024-01-28 02:02:50 +01:00
auxiliary
codegen Rollup merge of #120310 - krasimirgg:jan-v0-sym, r=Mark-Simulacrum 2024-01-30 16:57:48 +01:00
codegen-units Adjust compiler tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
coverage Rollup merge of #120185 - Zalathar:auto-derived, r=wesleywiser 2024-01-24 15:43:12 +01:00
coverage-run-rustdoc coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
debuginfo Update tests. 2024-01-27 16:38:57 +01:00
incremental hir: Simplify hir_owner_nodes query 2024-01-30 15:00:52 +03:00
mir-opt Rollup merge of #120424 - RalfJung:raw-ptr-meta, r=Nilstrieb 2024-01-30 11:19:16 +01:00
pretty Auto merge of #120227 - nnethercote:further-improve-space_between, r=petrochenkov 2024-01-31 02:01:43 +00:00
run-make Auto merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleywiser 2024-01-27 12:19:41 +00:00
run-make-fulldeps Auto merge of #118899 - veera-sivarajan:fix-makefile, r=Mark-Simulacrum 2024-01-05 07:42:03 +00:00
run-pass-valgrind
rustdoc Rollup merge of #120501 - GuillaumeGomez:glob-reexport-attr-merge-bugfix, r=notriddle 2024-01-31 12:10:53 +01:00
rustdoc-gui Rollup merge of #119746 - notriddle:notriddle/resize-close-modals, r=fmease 2024-01-22 07:56:42 +01:00
rustdoc-js Rollup merge of #118194 - notriddle:notriddle/tuple-unit, r=GuillaumeGomez 2024-01-06 16:07:46 +01:00
rustdoc-js-std Rollup merge of #118194 - notriddle:notriddle/tuple-unit, r=GuillaumeGomez 2024-01-06 16:07:46 +01:00
rustdoc-json
rustdoc-ui Don't hash lints differently to non-lints. 2024-01-31 08:25:29 +11:00
ui Suggest turnging if let into irrefutable let if appropriate 2024-02-06 03:53:06 +00:00
ui-fulldeps add missing potential_query_instability for keys and values in hashmap 2024-01-30 12:43:10 +08:00
COMPILER_TESTS.md