Commit Graph

22 Commits

Author SHA1 Message Date
Nadrieril f30392a985 Move the "matches no value" note to be a span label 2024-08-20 21:53:47 +02:00
Nadrieril efb28bdd90 Add a note with a link to explain empty types 2024-08-19 21:57:37 +02:00
Nadrieril 25964b541e Reword the "unreachable pattern" explanations 2024-08-19 21:39:57 +02:00
Nadrieril 99468bb760 Update tests 2024-08-10 12:07:17 +02:00
Nadrieril 64ac2b8082 Explain why a given pattern is considered unreachable 2024-07-24 08:02:55 +02:00
Esteban Küber e17388b809 Handle more cases of value suggestions 2024-04-10 20:36:14 +00:00
Esteban Küber a983dd8563 Tweak value suggestions in `borrowck` and `hir_analysis`
Unify the output of `suggest_assign_value` and `ty_kind_suggestion`.

Ideally we'd make these a single function, but doing so would likely require modify the crate dependency tree.
2024-04-09 23:37:13 +00:00
Matthias Krüger 26cb6c7287
Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors
mark `min_exhaustive_patterns` as complete

This is step 1 and 2 of my [proposal](https://github.com/rust-lang/rust/issues/119612#issuecomment-1918097361) to move `min_exhaustive_patterns` forward. The vast majority of in-tree use cases of `exhaustive_patterns` are covered by `min_exhaustive_patterns`. There are a few cases that still require `exhaustive_patterns` in tests and they're all behind references.

r? ``@ghost``
2024-02-23 17:02:03 +01:00
许杰友 Jieyou Xu (Joe) ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
Nadrieril 8e83d0cd75 Prefer `min_exhaustive_patterns` in tests 2024-02-13 16:45:53 +01:00
Nadrieril 61d6443467 Unmark the feature gate as incomplete 2024-02-13 16:45:29 +01:00
Nadrieril 4733b1bba5 Test `min_exhaustive_patterns` in more cases 2024-02-08 11:48:38 +01:00
Nadrieril ddef5b61f1 Don't warn an empty pattern unreachable if we're not sure the data is valid 2023-12-09 00:44:49 +01:00
Nadrieril 4e376cc104 Test empty types better 2023-12-09 00:39:59 +01:00
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Camille GILLOT 687659f33f Add diverging match guard test. 2023-10-24 15:30:17 +00:00
Camille GILLOT 6f3f878351 Normalize types when applying uninhabited predicate. 2023-06-27 17:10:14 +00:00
Camille GILLOT 9a7ed3625f Emit diagnostic for privately uninhabited uncovered witnesses. 2023-05-24 19:16:07 +00:00
Michael Goulet 2c23c7f0cd Erase regions before uninhabited check 2023-02-01 01:14:34 +00:00
mejrs 8476c517c0
Don't recommend `if let` if `let else` works 2023-01-11 14:40:07 -08:00
mejrs 31c20210b9
Migrate pattern matching 2023-01-11 14:40:02 -08:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00