| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-01-24 | Identify subpatterns by the path to them instead of spans | Nadrieril | -21/+3 | |
| 2021-01-24 | Add tests | Nadrieril | -0/+45 | |
| 2021-01-12 | Add tests for uninhabited types | Nadrieril | -212/+351 | |
| 2021-01-12 | Deduplicate some tests using revisions | Nadrieril | -227/+74 | |
| 2021-01-03 | Add notes to stderr of non-exhaustive-reference test | Daniel Noom | -2/+6 | |
| 2021-01-03 | Add note to non-exhaustive match on reference to empty | Daniel Noom | -0/+24 | |
| Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123 | ||||
| 2020-12-22 | Add some tests | Nadrieril | -28/+71 | |
| 2020-12-22 | Auto merge of #78242 - Nadrieril:rename-overlapping_endpoints-lint, r=varkor | bors | -86/+103 | |
| Rename `overlapping_patterns` lint As discussed in https://github.com/rust-lang/rust/issues/65477. I also tweaked a few things along the way. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking | ||||
| 2020-12-19 | Tweak diagnostics | Nadrieril | -8/+8 | |
| 2020-12-18 | Keep all witnesses of non-exhaustiveness | Nadrieril | -12/+14 | |
| 2020-12-18 | Add tests | Nadrieril | -14/+47 | |
| 2020-11-29 | `overlapping_range_endpoints` does not belong in the `unused` lint group | Nadrieril | -37/+39 | |
| 2020-11-29 | Improve error message | Nadrieril | -17/+32 | |
| 2020-11-29 | Be consistent about linting singletons | Nadrieril | -19/+3 | |
| 2020-11-29 | Rename the `overlapping_patterns` lint to `overlapping_range_endpoints` | Nadrieril | -33/+33 | |
| 2020-11-29 | Add tests | Nadrieril | -3/+19 | |
| 2020-11-28 | Correctly detect `usize`/`isize` range overlaps | Nadrieril | -2/+8 | |
| 2020-11-21 | Improve integer range tests | Nadrieril | -663/+892 | |
| 2020-11-19 | Regroup many usefulness-related test in the same folder | Nadrieril | -0/+751 | |
| 2020-11-18 | Auto merge of #78995 - Nadrieril:clean-empty-match, r=varkor | bors | -55/+162 | |
| Handle empty matches cleanly in exhaustiveness checking This removes the special-casing of empty matches that was done in `check_match`. This fixes most of https://github.com/rust-lang/rust/issues/55123. Somewhat unrelatedly, I also made `_match.rs` more self-contained, because I think it's cleaner. r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking | ||||
| 2020-11-17 | Fix exhaustiveness in case a byte string literal is used at slice type | oli | -2/+2 | |
| 2020-11-16 | Add a test for foreign empty enums | Nadrieril | -48/+102 | |
| 2020-11-12 | Handle empty matches cleanly | Nadrieril | -36/+43 | |
| 2020-11-12 | Add tests | Nadrieril | -42/+88 | |
| 2020-11-01 | Fix #78549 | Nadrieril | -0/+25 | |
| Before #78430, string literals worked because `specialize_constructor` didn't actually care too much which constructor was passed to it unless needed. Since then, string literals are special cased and a bit hacky. I did not anticipate patterns for the `&str` type other than string literals, hence this bug. This makes string literals less hacky. | ||||
| 2020-10-20 | Accidentally fixed #78071 | Nadrieril | -24/+36 | |
| 2020-10-18 | The only remaining constant patterns are opaque | Nadrieril | -9/+2 | |
| 2020-10-18 | Destructure byte array constants to array patterns instead of keeping them ↵ | Oliver Scherer | -2/+2 | |
| opaque | ||||
| 2020-10-18 | Add some tests | Nadrieril | -0/+267 | |
| 2020-09-20 | Implement destructuring for all aggregates and for references | Oliver Scherer | -41/+143 | |
| 2020-09-02 | pretty: trim paths of unique symbols | Dan Aloni | -10/+10 | |
| 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-27 | mv std libs to library/ | mark | -3/+3 | |
| 2020-07-05 | Address code reviews | Yuki Okushi | -10/+21 | |
| 2020-07-05 | Explain exhaustive matching on {usize,isize} maximum values | Yuki Okushi | -0/+46 | |
| 2020-06-26 | Show the values and computation that would overflow a const evaluation or ↵ | Oliver Scherer | -31/+31 | |
| propagation | ||||
| 2020-06-13 | Prefer the associated consts for pattern matching error | Lzu Tao | -25/+25 | |
| 2020-05-23 | Remove out-of-date comment | Nadrieril | -1/+0 | |
| 2020-05-23 | Work around type normalization issues | Nadrieril | -0/+23 | |
| 2020-05-17 | We don't use tyerr anymore | Nadrieril | -0/+22 | |
| This however unearthed a bug, hence the FIXME and the workaround. | ||||
| 2020-04-11 | rustc: Add a warning count upon completion | RoccoDev | -1/+3 | |
| 2020-04-02 | tests: remove ignore directives from tests that mention core/alloc/std spans. | Eduard-Mihai Burtescu | -27/+12 | |
| 2020-03-27 | non-exhastive diagnostic: add note re. scrutinee type | Mazdak Farrokhzad | -0/+108 | |
| 2020-03-23 | Ignore tests on some platforms due to #53081 | Aaron Hill | -12/+27 | |
| 2020-03-22 | Store idents for `DefPathData` into crate metadata | Aaron Hill | -0/+18 | |
| 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. | ||||
| 2020-03-17 | Update tests for erasing regions in typeck | Matthew Jasper | -2/+2 | |
| 2020-01-24 | Normalise notes with the/is | varkor | -17/+17 | |
| 2020-01-20 | check_match: simplify check_arm | Mazdak Farrokhzad | -1/+3 | |
| 2020-01-18 | slice_patterns: organize some tests | Mazdak Farrokhzad | -0/+11 | |
| 2020-01-18 | slice_patterns: remove gates in tests | Mazdak Farrokhzad | -68/+55 | |
| 2020-01-09 | Update tests | Vadim Petrochenkov | -2/+24 | |
