about summary refs log tree commit diff
path: root/tests/ui/uninhabited
AgeCommit message (Collapse)AuthorLines
2025-08-20Detect missing `if let` or `let-else`Esteban Küber-0/+63
During `let` binding parse error and encountering a block, detect if there is a likely missing `if` or `else`: ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{` --> $DIR/missing-if-let-or-let-else.rs:14:25 | LL | let Some(x) = foo() { | ^ expected one of `.`, `;`, `?`, `else`, or an operator | help: you might have meant to use `if let` | LL | if let Some(x) = foo() { | ++ help: alternatively, you might have meant to use `let else` | LL | let Some(x) = foo() else { | ++++ ```
2025-08-10Rehome tests/ui/issues/ tests [4/?]Oneirical-0/+22
2025-07-23Add `ignore-backends` annotations in failing GCC backend ui testsGuillaume Gomez-0/+1
2025-07-20Don't consider unstable fields always-inhabitedNadrieril-94/+49
This reverts the hack in https://github.com/rust-lang/rust/pull/133889 now that `Pin`'s field is no longer public.
2025-07-20Add testNadrieril-8/+71
2025-07-04treat box patterns as deref patterns in THIR and usefulness analysisdianne-15/+27
This removes special-casing of boxes from `rustc_pattern_analysis`, as a first step in replacing `box_patterns` with `deref_patterns`. Incidentally, it fixes a bug caused by box patterns being represented as structs rather than pointers, where `exhaustive_patterns` could generate spurious `unreachable_patterns` lints on arms required for exhaustiveness; following the lint's advice would result in an error.
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-1/+1
2025-03-18Dont consider fields that are forced unstable due to ↵Michael Goulet-1/+30
-Zforce-unstable-if-unmarked to be uninhabited
2025-03-18Consider fields to be inhabited if they are unstableMichael Goulet-0/+81
2025-02-20Add test that uninhabited repr(transparent) type has same function return ↵Zachary S-0/+33
ABI as wrapped type. Fix codegen of uninhabited PassMode::Indirect return types. Add codegen test for uninhabited PassMode::Indirect return types. Enable optimizations for uninhabited return type codegen test
2025-01-27Remove all dead files inside tests/ui/León Orell Valerian Liehr-26/+0
2024-11-23Update tests for new TRPL chapter orderChris Krycho-3/+3
2024-09-13Add a machine-applicable suggestion to "unreachable pattern"Nadrieril-2/+8
2024-09-11Revert warning empty patterns as unreachableNadrieril-4/+5
2024-08-20Move the "matches no value" note to be a span labelNadrieril-6/+3
2024-08-19Add a note with a link to explain empty typesNadrieril-0/+3
2024-08-19Reword the "unreachable pattern" explanationsNadrieril-3/+3
2024-08-10Update testsNadrieril-78/+39
2024-07-24Explain why a given pattern is considered unreachableNadrieril-0/+5
2024-04-10Handle more cases of value suggestionsEsteban Küber-3/+36
2024-04-09Tweak value suggestions in `borrowck` and `hir_analysis`Esteban Küber-2/+2
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-02-23Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errorsMatthias Krüger-7/+6
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-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-8/+8
2024-02-13Prefer `min_exhaustive_patterns` in testsNadrieril-2/+2
2024-02-13Unmark the feature gate as incompleteNadrieril-5/+4
2024-02-08Test `min_exhaustive_patterns` in more casesNadrieril-3/+32
2023-12-09Don't warn an empty pattern unreachable if we're not sure the data is validNadrieril-18/+6
2023-12-09Test empty types betterNadrieril-13/+11
2023-11-24Show number in error message even for one errorNilstrieb-2/+2
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-24Add diverging match guard test.Camille GILLOT-0/+10
2023-06-27Normalize types when applying uninhabited predicate.Camille GILLOT-0/+32
2023-05-24Emit diagnostic for privately uninhabited uncovered witnesses.Camille GILLOT-1/+10
2023-02-01Erase regions before uninhabited checkMichael Goulet-0/+18
2023-01-11Don't recommend `if let` if `let else` worksmejrs-10/+2
2023-01-11Migrate pattern matchingmejrs-13/+10
2023-01-11Move /src/test to /testsAlbert Larsan-0/+388