about summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0004-2.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-25/+0
2022-12-13Avoid rendering empty annotationsOli Scherer-2/+6
2022-12-13Don't emit empty notesOli Scherer-2/+0
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-8/+3
available
2022-07-01Shorten def_span for more items.Camille GILLOT-11/+8
2022-03-08Change wording of suggestion to add missing `match` armEsteban Kuber-1/+1
2022-03-08Point at uncovered variants in enum definition in `note` instead of a ↵Esteban Kuber-7/+13
`span_label` This makes the order of the output always consistent: 1. Place of the `match` missing arms 2. The `enum` definition span 3. The structured suggestion to add a fallthrough arm
2022-03-08When encountering a match expr with no arms, suggest itEsteban Kuber-1/+6
Given ```rust match Some(42) {} ``` suggest ```rust match Some(42) { None | Some(_) => todo!(), } ```
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-1/+1
2020-09-02pretty: trim paths of unique symbolsDan Aloni-1/+1
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-07-27mv std libs to library/mark-1/+1
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-1/+1
2020-03-27non-exhastive diagnostic: add note re. scrutinee typeMazdak Farrokhzad-0/+1
2020-03-23Ignore tests on some platforms due to #53081Aaron Hill-1/+1
2020-03-22Store idents for `DefPathData` into crate metadataAaron Hill-0/+8
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2019-12-04Forgot to update some test outputsNadrieril-2/+2
2019-03-11Update testsVadim Petrochenkov-1/+1
2019-03-02Reword error messageEsteban Küber-1/+1
2019-03-02Point at enum definition when match patterns are not exhaustiveEsteban Küber-5/+1
``` error[E0004]: non-exhaustive patterns: type `X` is non-empty --> file.rs:9:11 | 1 | / enum X { 2 | | A, | | - variant not covered 3 | | B, | | - variant not covered 4 | | C, | | - variant not covered 5 | | } | |_- `X` defined here ... 9 | match x { | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `B` and `C` not covered --> file.rs:11:11 | 1 | / enum X { 2 | | A, 3 | | B, 4 | | C, | | - not covered 5 | | } | |_- `X` defined here ... 11 | match x { | ^ patterns `C` not covered ``` When a match expression doesn't have patterns covering every variant, point at the enum's definition span. On a best effort basis, point at the variant(s) that are missing. This does not handle the case when the missing pattern is due to a field's enum variants: ``` enum E1 { A, B, C, } enum E2 { A(E1), B, } fn foo() { match E2::A(E1::A) { E2::A(E1::B) => {} E2::B => {} } //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled } ``` Unify look between match with no arms and match with some missing patterns. Fix #37518.
2018-12-25Remove licensesMark Rousskov-2/+2
2018-11-20Enclose type in backticks for "non-exhaustive patterns" errorvarkor-1/+1
This makes the error style consistent with the convention in error messages.
2018-11-03Make "all possible cases" help message uniform with existing help messagesvarkor-1/+1
Specifically no capitalisation or trailing full stops.
2018-03-14update testsGuillaume Gomez-1/+1
2018-02-26Update UI testsVadim Petrochenkov-2/+2
2018-02-25Update ui testsGuillaume Gomez-0/+1
2018-02-08Move some E0XXX to `ui`Esteban Küber-0/+14