aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/tests/patterns.rs
Commit message (Collapse)AuthorAgeFilesLines
* internal: add fn to minicoreAleksey Kladov2021-06-161-40/+36
|
* Fix coercion in match with expected typeFlorian Diebold2021-06-121-40/+17
| | | | Plus add infrastructure to test type mismatches without expect.
* Fix bind patterns always being treated as ref taking patternsLukas Wirth2021-06-021-19/+28
|
* Fix test after rebaseFlorian Diebold2021-05-211-1/+1
|
* internal: Record mismatches of pattern types.Dawer2021-05-191-1/+57
|
* Merge #8813bors[bot]2021-05-161-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8813: Get some more array lengths! r=lf- a=lf- This is built on #8799 and thus contains its changes. I'll rebase it onto master when that one gets merged. It adds support for r-a understanding the length of: * `let a: [u8; 2] = ...` * `let a = b"aaa"` * `let a = [0u8; 4]` I have added support for getting the values of byte strings, which was not previously there. I am least confident in the correctness of this part and it probably needs some more tests, as we currently have only one test that exercised that part (!). Fixes #2922. Co-authored-by: Jade <[email protected]>
| * Add lowering of array lengths in typesJade2021-05-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | Now e.g. ```rust fn a(b: [u8; 2]) { } ``` will know about the length of b.
* | Fix false positive "Missing match arm".Dawer2021-05-141-1/+1
|/
* Add basic support for array lengths in typesJade2021-05-111-3/+3
| | | | | | | | | | This recognizes `let a = [1u8, 2, 3]` as having type `[u8; 3]` instead of the previous `[u8; _]`. Byte strings and `[0u8; 2]` kinds of range array declarations are unsupported as before. I don't know why a bunch of our rustc tests had single quotes inside strings un-escaped by `UPDATE_EXPECT=1 cargo t`, but I don't think it's bad? Maybe something in a nightly?
* Support macros in pattern positionJonas Schievink2021-04-111-1/+27
|
* Fix box pattern inference panicLukas Wirth2021-03-211-0/+22
|
* Use upstream cov-markLaurențiu Nicola2021-03-081-2/+1
|
* Implement const pat inferenceLukas Wirth2020-12-231-0/+30
|
* Properly infer tuple struct patterns when encountering ellipsisLukas Wirth2020-11-241-0/+48
|
* Properly infer tuple patterns when encountering ellipsisLukas Wirth2020-11-241-0/+47
|
* Add box pattern testJonas Schievink2020-09-121-0/+25
|
* Switch to expect_test from crates.ioAleksey Kladov2020-08-211-1/+1
|
* Rename ra_hir_ty -> hir_tyAleksey Kladov2020-08-131-0/+656