Aleksey Kladov
4e3f5cc729
cleanup main loop
2019-08-31 14:47:37 +03:00
bors[bot]
f90a886301
Merge #1740
...
1740: ⬆️ lsp-server r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-30 17:39:19 +00:00
Aleksey Kladov
983de30a56
inline thread-worker
2019-08-30 20:32:59 +03:00
Aleksey Kladov
7cc14a7596
⬆️ lsp-server
2019-08-30 20:18:57 +03:00
bors[bot]
ffc95759c7
Merge #1739
...
1739: move lsp-server to a separate repository r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-30 14:24:39 +00:00
Aleksey Kladov
72a3722470
move lsp-server to a separate repository
2019-08-30 17:24:11 +03:00
bors[bot]
7d72ca8000
Merge #1738
...
1738: ⬆️ insta r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-29 14:04:28 +00:00
Aleksey Kladov
0f6c048ce1
⬆️ insta
2019-08-29 17:04:01 +03:00
bors[bot]
5a99184967
Merge #1680
...
1680: Correctly infer match with early return r=flodiebold a=SomeoneToIgnore
Fixes #1505
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-08-27 18:29:00 +00:00
Kirill Bulatov
4adfdea1ad
Small fixes
2019-08-26 23:00:35 +03:00
Kirill Bulatov
590aed2eec
Remove redundant tests
2019-08-26 23:00:27 +03:00
Florian Diebold
c256a72b03
Fix 'missing Ok in tail expr' validation
...
Because of the coercion change, the type mismatch now only happens on the block
expression.
2019-08-26 22:44:50 +03:00
Florian Diebold
e37b6c5837
Make infer_block not unify; add back calculate_least_upper_bound
2019-08-26 22:44:50 +03:00
Kirill Bulatov
44386d5373
An attempt to add the coercion logic for Never
2019-08-26 22:44:50 +03:00
Kirill Bulatov
89f3cc587d
Properly coerce never types
2019-08-26 22:44:50 +03:00
Kirill Bulatov
8b612251fd
Remove extra inference test
2019-08-26 22:44:50 +03:00
Kirill Bulatov
44cf7b34fe
Fix never in if expressions
2019-08-26 22:44:50 +03:00
Kirill Bulatov
c1f47c3788
Add test marks
2019-08-26 22:44:50 +03:00
Kirill Bulatov
0ce05633a1
Fix match type inference for Never match arms
2019-08-26 22:44:50 +03:00
Kirill Bulatov
f63cfd5fca
Tests
2019-08-26 22:44:50 +03:00
bors[bot]
04c2961d0c
Merge #1736
...
1736: Switch to `@types/vscode` and `vscode-test` r=matklad a=bkchr
The old `vscode` package is outdated and it is recommened to switch to
these two new packages. This also solves a problem of a missing `.d.ts`
for `vscode` in Nixos.
Co-authored-by: Bastian Köcher <git@kchr.de>
2019-08-26 08:07:59 +00:00
Bastian Köcher
b58f84626f
Switch to @types/vscode
and vscode-test
...
The old `vscode` package is outdated and it is recommened to switch to
these two new packages. This also solves a problem of a missing `.d.ts`
for `vscode` in Nixos.
2019-08-26 08:22:48 +02:00
bors[bot]
1fbe5ffba8
Merge #1735
...
1735: ⬆️ vfs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-25 10:13:37 +00:00
Aleksey Kladov
ee932d464b
⬆️ vfs
2019-08-25 13:13:08 +03:00
bors[bot]
cd433ed194
Merge #1734
...
1734: Strip indents and empty lines in check_apply_diagnostic_fix_from_position r=matklad a=matklad
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
2019-08-25 09:58:54 +00:00
Phil Ellison
14a23d1bde
Strip indents and empty lines in check_apply_diagnostic_fix_from_position
2019-08-25 12:56:23 +03:00
Phil Ellison
59dd30402b
Specify cursor position in ok-wrapping tests, and switch to using analysis_and_position function
2019-08-25 12:56:23 +03:00
Phil Ellison
6620949cae
Simplify checking return type, add new test
2019-08-25 12:56:23 +03:00
Phil Ellison
6a04e9ce14
Fix build for Diagnostic type change
2019-08-25 12:56:23 +03:00
Phil Ellison
200470692f
Cast SyntaxNodePtr to AstPtr directly
2019-08-25 12:56:23 +03:00
Phil Ellison
c8911e872e
Remove reliance on expr ordering
2019-08-25 12:56:23 +03:00
Phil Ellison
4f6f3933ec
cargo format
2019-08-25 12:55:56 +03:00
Phil Ellison
456e72c4e4
Change test to not rely on trait inference
2019-08-25 12:55:56 +03:00
Phil Ellison
a40e390860
Check type rather than just name in ok-wrapping diagnostic. Add test for handling generic functions (which currently fails)
2019-08-25 12:55:56 +03:00
Phil Ellison
62c2002e2b
Add test that ok-wrapping handles type aliases
2019-08-25 12:55:55 +03:00
Phil Ellison
d025016f92
Mock std String and Result types in tests for ok-wrapping diagnostic
2019-08-25 12:55:55 +03:00
Phil Ellison
bacb938ab0
Add type_mismatches to InferenceResult and use this in ok-wrapping code fix
2019-08-25 12:55:55 +03:00
Phil Ellison
d00a285fa7
Initial implementation of Ok-wrapping
2019-08-25 12:55:55 +03:00
bors[bot]
866b41ddd8
Merge #1733
...
1733: Parse arbitrarily complex `box` patterns. r=matklad a=ecstatic-morse
This fully resolves the pattern part of #1412 by enabling the parsing of complex `box` patterns such as:
```rust
let box Struct { box i, j: box Inner(box &x) } = todo!();
```
This introduces a new `ast::BoxPat` (in the mold of `ast::RefPat`) that gets translated to `hir::Pat::Missing`.
Co-authored-by: Dylan MacKenzie <ecstaticmorse@gmail.com>
2019-08-25 09:47:44 +00:00
Dylan MacKenzie
c93903e9c7
Generate and bless tests
2019-08-23 16:24:30 -07:00
Dylan MacKenzie
c08ad1cf8a
Handle Struct { box i }
syntax
...
Named structs can have `box` patterns that will bind to their fields.
This is similar to the behavior of the `ref` and `mut` fields, but is at
least a little bit surprising.
2019-08-23 16:20:18 -07:00
Dylan MacKenzie
83433cd1f0
Centralize box
pattern tests in patterns.rs
2019-08-23 16:19:53 -07:00
Dylan MacKenzie
1e991f2eaf
Convert BoxPat
to Missing
in HIR
2019-08-23 16:07:11 -07:00
Dylan MacKenzie
ab51f57e1d
Parse BoxPat
2019-08-23 16:07:11 -07:00
Dylan MacKenzie
e6f3790106
Add BoxPat
variant
2019-08-23 15:11:34 -07:00
bors[bot]
fdece911fe
Merge #1732
...
1732: remove wrong config from .travis.yml r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-23 16:34:54 +00:00
Aleksey Kladov
c75f5d1190
remove wrong config from .travis.yml
...
The right key here is target_branch, not branch.
However, this works anyway b/c gh-pages is the default.
2019-08-23 19:33:57 +03:00
bors[bot]
a832a2f7dd
Merge #1731
...
1731: rename pos_field -> tuple_field r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-23 14:01:06 +00:00
Aleksey Kladov
5b18a4eef9
rename struct -> record, pos -> tuple
2019-08-23 16:59:50 +03:00
bors[bot]
c12dce0073
Merge #1716
...
1716: make ast object safe r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-23 12:07:56 +00:00