Commit Graph

5140 Commits

Author SHA1 Message Date
bors[bot]
8f92309dbc
Merge #1909
1909: move ast builder to a separate file r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-09-25 11:35:50 +00:00
Aleksey Kladov
69689625ce move ast builder to a separate file 2019-09-25 14:35:26 +03:00
Aleksey Kladov
f32081fa18 move assists to subdir 2019-09-25 14:29:41 +03:00
bors[bot]
d9b4835625
Merge #1900 #1907
1900: Add rollup bundler for vscode extension r=matklad a=JasperDeSutter

This is an alternative approach to #1451 - bundling should improve extension startup times as explained [here](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).

I'm using [rollup.js](https://rollupjs.org/guide/en/) which is a small and light bundler as opposed to webpack. Bundling is only done for creating the final vsix package, reducing 196 files down to 7 (of which 1 javascript file).

1907: update documentation according to new settings r=matklad a=lesurp

1. `command` has been added to change the default cargo-watch command
2. `check-arguments` has been renamed to `arguments` as a consequence

Thoses changes were merged in #1434

Co-authored-by: JasperDeSutter <jasper.desutter@gmail.com>
Co-authored-by: Paul Lesur <paul.lesur@dfki.de>
2019-09-25 09:02:59 +00:00
bors[bot]
63433ba79a
Merge #1906
1906: Add missing lang-items to `def_crates` r=matklad a=sinkuu



Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
2019-09-25 08:55:32 +00:00
Paul Lesur
f14e2ffbe0 update documentation according to new settings
1. `command` has been added to change the default cargo-watch command
2. `check-arguments` has been renamed to `arguments` as a consequence

Thoses changes were merged in #1434
2019-09-25 10:55:18 +02:00
bors[bot]
6bac2d0a63
Merge #1904
1904: Remove redundant `clone()` r=matklad a=sinkuu



Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
2019-09-25 05:27:07 +00:00
Shotaro Yamada
89d0ff1623 Add missing lang-items to def_crates 2019-09-25 12:02:53 +09:00
Shotaro Yamada
9c45a9e586 Remove redundant clone() 2019-09-25 10:32:01 +09:00
Shotaro Yamada
7e0fa71532 Avoid intermediate allocation 2019-09-25 10:30:33 +09:00
bors[bot]
c7420ddaaa
Merge #1845
1845: Closure types r=flodiebold a=flodiebold

This adds types for closures and makes them implement the `Fn` traits (we don't currently care or try to infer `Fn` vs. `FnMut` vs. `FnOnce`; this would require move analysis, I think).

This requires some changes in Chalk; one is that we need to know the self type when asked for impls, so we can synthesize `Fn` trait impls for closures; but also there's a problem that prevents us from normalizing the closure output type correctly that I _think_ will be fixed on the Chalk side (basically, we ask too early and try to solve `Normalize(<?1 as FnOnce<(u32,)>>::Output => ?0)` -- note the variable in the self type -- and instead of an ambiguous answer, we get back that it can't be solved, so we don't try again. Niko mentioned he's making all goals where the self type is unconstrained flounder, which I think would mean this would be ambiguous).

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-09-24 21:12:26 +00:00
Florian Diebold
6a86706650 Implement the call argument checking order hack for closures 2019-09-24 23:05:12 +02:00
Florian Diebold
a0aeb6e7ad Make the closure_1 test work 2019-09-24 23:05:12 +02:00
Florian Diebold
3b06faad26 Make closures impl closure traits 2019-09-24 23:05:12 +02:00
Florian Diebold
619a8185a6 Give closures types 2019-09-24 23:05:12 +02:00
bors[bot]
36fb3f53d7
Merge #1903
1903: Upgrade Chalk again r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-09-24 20:30:45 +00:00
Florian Diebold
7bb6fdcf52 Upgrade Chalk again 2019-09-24 22:29:52 +02:00
bors[bot]
4c293c0a57
Merge #1902
1902: simplify r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-09-24 06:28:40 +00:00
Aleksey Kladov
66101e931c simplify 2019-09-24 09:28:16 +03:00
JasperDeSutter
2151d4da6a add rollup bundler for vscode extension 2019-09-23 23:25:16 +02:00
bors[bot]
c12a713739
Merge #1898
1898: Drive by lints r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-09-23 18:47:14 +00:00
Jeremy Kolb
13d7fc1620
Revert Self 2019-09-23 14:38:05 -04:00
bors[bot]
a745afcc36
Merge #1899
1899: Upgrade Chalk r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-09-23 18:36:45 +00:00
Florian Diebold
6df9c4035a Upgrade Chalk 2019-09-23 20:36:15 +02:00
kjeremy
1808175f98 Drive by lints 2019-09-23 14:31:30 -04:00
bors[bot]
5063274959
Merge #1897
1897: Split off path expression inference code into submodule r=matklad a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-09-23 16:57:21 +00:00
Florian Diebold
4f1afe77b9 Split off path expression inference code into submodule 2019-09-23 18:53:52 +02:00
bors[bot]
c2d9cca4e4
Merge #1895
1895: Handle associated type shorthand (`T::Item`) (Second attempt) r=flodiebold a=flodiebold

This is only allowed for generic parameters (including `Self` in traits), and
special care needs to be taken to not run into cycles while resolving it,
because we use the where clauses of the generic parameter to find candidates for
the trait containing the associated type, but the where clauses may themselves
contain instances of short-hand associated types.

In some cases this is even fine, e.g. we might have `T: Trait<U::Item>, U:
Iterator`. If there is a cycle, we'll currently panic, which isn't great, but
better than overflowing the stack...

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-09-22 22:01:38 +00:00
bors[bot]
efcbca9559
Merge #1896
1896: remove obsolete TOOD r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-09-22 20:48:41 +00:00
Aleksey Kladov
43da23401d remove obsolete TOOD
I have no idea what I've meant to fix here :-(
2019-09-22 23:43:37 +03:00
Aleksey Kladov
9a0fef71cc test for TOODs as well 2019-09-22 23:43:23 +03:00
bors[bot]
6cc3559daa
Merge #1885
1885: Suspicious line endings r=matklad a=kjeremy

I'm skeptical of this change but cargo format keeps bugging me about it.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-09-22 20:40:40 +00:00
Aleksey Kladov
76290afa9a minor cleanup 2019-09-22 23:39:29 +03:00
Florian Diebold
bc905d202c Handle projection types from Chalk 2019-09-22 20:08:46 +02:00
Florian Diebold
18bf278c25 Handle associated type shorthand (T::Item)
This is only allowed for generic parameters (including `Self` in traits), and
special care needs to be taken to not run into cycles while resolving it,
because we use the where clauses of the generic parameter to find candidates for
the trait containing the associated type, but the where clauses may themselves
contain instances of short-hand associated types.

In some cases this is even fine, e.g. we might have `T: Trait<U::Item>, U:
Iterator`. If there is a cycle, we'll currently panic, which isn't great, but
better than overflowing the stack...
2019-09-22 20:02:32 +02:00
bors[bot]
468e1d14c1
Merge #1891
1891: Support open source version of vscode as well r=matklad a=jens1o

This patch adds support for https://github.com/VSCodium/vscodium - an truly open source version of vscode.

Co-authored-by: Jens Hausdorf <mail@jens-hausdorf.de>
2019-09-21 11:33:41 +00:00
Jens Hausdorf
c70e30e409
Support open source version of vscode as well 2019-09-21 10:24:41 +02:00
bors[bot]
0ebba70ea2
Merge #1890
1890: Support loop as argument r=matklad a=kjeremy

Fixes #1839 

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-09-20 20:38:23 +00:00
kjeremy
fef7fcf5a9 Support loop as argument 2019-09-20 16:35:29 -04:00
bors[bot]
07bbe57fef
Merge #1888
1888: allow compiling ra_ide_api on wasm r=matklad a=matklad

bors r+

this is from #1746 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-09-20 18:21:18 +00:00
Aleksey Kladov
4d81432213 allow compiling ra_ide_api on wasm 2019-09-20 20:39:02 +03:00
bors[bot]
7d6c3de890
Merge #1886
1886: Simplify match arm r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-09-20 16:06:58 +00:00
kjeremy
2d99e6de27 Simplify match arm 2019-09-20 12:03:25 -04:00
kjeremy
6da645d858 Suspicious line endings 2019-09-20 11:55:59 -04:00
bors[bot]
3575f7c4a2
Merge #1884
1884: Add indexing to record_field_pat r=matklad a=kjeremy

Fixes #1870 

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-09-20 15:54:01 +00:00
kjeremy
17a45a686c Apply suggestion 2019-09-20 11:49:45 -04:00
bors[bot]
0492b18ed4
Merge #1883
1883: Fix path attribute causing false "unresolved module" error for submodules r=matklad a=gfreezy

fixed #1880

Co-authored-by: gfreezy <gfreezy@gmail.com>
2019-09-20 15:45:58 +00:00
kjeremy
5a65d4d9fb Add indexing to record_field_pat 2019-09-20 11:43:34 -04:00
gfreezy
6a4cf48bff fix module attr path 2019-09-20 23:20:43 +08:00
bors[bot]
24ac228c39
Merge #1882
1882: fix infinite loop in the parser r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-09-20 13:58:09 +00:00