rust/tests
Esteban Küber 8221f9c837 Account for ! arm in tail match expr
On functions with a default return type that influences the coerced type
of `match` arms, check if the failing arm is actually of type `!`. If
so, suggest changing the return type so the coercion against the prior
arms is successful.

```
error[E0308]: `match` arms have incompatible types
  --> $DIR/match-tail-expr-never-type-error.rs:9:13
   |
LL |   fn bar(a: bool) {
   |                  - help: try adding a return type: `-> i32`
LL | /     match a {
LL | |         true => 1,
   | |                 - this is found to be of type `{integer}`
LL | |         false => {
LL | |             never()
   | |             ^^^^^^^
   | |             |
   | |             expected integer, found `()`
   | |             this expression is of type `!`, but it get's coerced to `()` due to its surrounding expression
LL | |         }
LL | |     }
   | |_____- `match` arms have incompatible types
```

Fix #24157.
2023-11-27 16:19:02 +00:00
..
assembly Remove now deprecated target x86_64-sun-solaris. 2023-11-20 15:15:47 +01:00
auxiliary
codegen convert ehcont-guard to an unstable option 2023-11-21 14:24:23 -08:00
codegen-units
coverage coverage: Simplify building coverage expressions based on sums 2023-11-25 12:29:20 +11:00
coverage-run-rustdoc coverage: Rename the run-coverage test mode to coverage-run 2023-11-08 16:41:24 +11:00
debuginfo
incremental
mir-opt Bless MIR tests 2023-11-26 00:14:18 +00:00
pretty
run-make Bless run-make tests 2023-11-24 19:15:52 +01:00
run-make-fulldeps Merge Queries::{ongoing_codegen,linker}. 2023-11-22 13:22:49 +11:00
run-pass-valgrind
rustdoc Rollup merge of #118224 - dtolnay:rustdocsortunstable, r=fmease 2023-11-24 08:23:54 +01:00
rustdoc-gui rustdoc-search: add support for associated types 2023-11-19 18:54:36 -07:00
rustdoc-js rustdoc-search: avoid infinite where clause unbox 2023-11-24 10:42:11 -07:00
rustdoc-js-std rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
rustdoc-json rustdoc-json: Fix test so it actuall checks things 2023-11-09 12:13:16 +00:00
rustdoc-ui Manual find replace updates 2023-11-24 21:04:51 +01:00
ui Account for ! arm in tail match expr 2023-11-27 16:19:02 +00:00
ui-fulldeps Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
COMPILER_TESTS.md