Aleksey Kladov
6a77ec7bbe
Rename ra_hir_ty -> hir_ty
2020-08-13 16:35:29 +02:00
Laurențiu Nicola
f7e4b99d15
Replace remaining insta uses
2020-07-21 13:11:46 +03:00
adamrk
0ebc24043b
Infer type for slice wildcard patterns
2020-06-25 23:16:58 +02:00
Laurențiu Nicola
2bd9f0f020
Fix string literal inference in match
2020-06-24 13:20:06 +03:00
Aleksey Kladov
d016cb4867
Use only one code-path for parsing fixtures
...
This removes leading newlines everywhere, shifting all ranges in tests
by one
2020-06-24 00:48:38 +02:00
Florian Diebold
6f67a46a6a
Fix match ergonomics in closure parameters
...
Fixes #4476 .
2020-05-29 17:36:43 +02:00
Aleksey Kladov
ecac5d7de2
Switch to new magic marks
2020-05-20 13:02:53 +02:00
Florian Diebold
3f42b2e837
Handle Self
in values and patterns
...
I.e.
- `Self(x)` or `Self` in tuple/unit struct impls
- `Self::Variant(x)` or `Self::Variant` in enum impls
- the same in patterns
Fixes #4454 .
2020-05-15 17:25:28 +02:00
Aleksey Kladov
8843588fca
Convert tests to text-size
2020-04-25 11:59:18 +02:00
Aleksey Kladov
b79fd82559
Correctly infer types in guard expressions
...
The root cause was that we forgot to add bindings from the arm to the
guard expression
closes #3980
2020-04-18 22:16:04 +02:00
Aleksey Kladov
5e5eb6a108
Align grammar for record patterns and literals
...
The grammar now looks like this
[name_ref :] pat
2020-04-12 00:00:15 +02:00
Florian Diebold
b392a732d3
Add inference for literal and range patterns
2020-04-01 20:27:47 +02:00
Josh Mcguigan
f5efa17515
handle array pattern matching type inference
2020-03-01 14:02:32 -08:00
Josh Mcguigan
b9ef7a6b98
remove match statement, handle suffix
2020-03-01 12:13:05 -08:00
Josh Mcguigan
d0e282f6b1
handle arbitrary length slices
2020-03-01 07:35:15 -08:00
Josh Mcguigan
f353625705
match single prefix slice
2020-03-01 06:25:38 -08:00
Florian Diebold
f1f45f9191
Fix handling of const patterns
...
E.g. in `match x { None => ... }`, `None` is a path pattern (resolving to the
option variant), not a binding. To determine this, we need to try to resolve the
name during lowering. This isn't too hard since we already need to resolve names
for macro expansion anyway (though maybe a bit hacky).
Fixes #1618 .
2020-02-21 17:01:19 +01:00
Florian Diebold
4789a993eb
Fix printing of function types
2020-02-07 18:28:10 +01:00
Florian Diebold
9747156f6c
Split up ty tests a bit
2019-12-03 18:00:29 +01:00