Commit graph

5328 commits

Author SHA1 Message Date
Wilco Kusee
ce4fb06dec
Truncate hints longer than 20 characters 2019-10-10 14:52:05 +02:00
bors[bot]
8bcf40115f
Merge #1979
1979: Refactor and fix some more edge cases around name resolution r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-10 11:51:56 +00:00
Aleksey Kladov
5140283277 simplify some tests 2019-10-10 14:51:35 +03:00
Aleksey Kladov
ce0d4a3b1d Refactor and fix some more edge cases around name resolution 2019-10-10 14:46:14 +03:00
bors[bot]
72b8cfb5aa
Merge #1978
1978: if completion does auto-insertion, indicate this in the label r=matklad a=matklad

bors try

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-10 10:19:11 +00:00
Aleksey Kladov
31561b118f if completion does auto-insertion, indicate this in the label 2019-10-10 13:18:42 +03:00
bors[bot]
793f7e69f2
Merge #1976
1976: Add `module` methods r=matklad a=viorina



Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-10-09 13:17:55 +00:00
Ekaterina Babshukova
aa2f58550a add module methods 2019-10-09 14:59:47 +03:00
bors[bot]
cc2f2a74f6
Merge #1975
1975: ⬆️ smol_str, take 2 r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-09 11:49:16 +00:00
Aleksey Kladov
69e545cc61 ⬆️ smol_str, take 2 2019-10-09 14:48:50 +03:00
bors[bot]
3fdfc971aa
Merge #1974
1974: ⬆️ smol_str r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-09 11:28:56 +00:00
Aleksey Kladov
79ab54b8dd ⬆️ smol_str 2019-10-09 14:28:27 +03:00
bors[bot]
afc871199d
Merge #1973
1973: add <> for type aliases as well r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-09 08:54:00 +00:00
Aleksey Kladov
d9f83d9b16 add <> for type aliases as well 2019-10-09 11:53:32 +03:00
Aleksey Kladov
048be5d9a3 smal cleanup 2019-10-09 11:26:41 +03:00
bors[bot]
b976772566
Merge #1972
1972: extend selection correctly handles commas in tuples r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-09 08:26:31 +00:00
Aleksey Kladov
8d65530843 extend selection correctly handles commas in tuples 2019-10-09 11:26:09 +03:00
bors[bot]
d5a6cac335
Merge #1970
1970: Add <> when completing generics r=matklad a=matklad

@flodiebold wdyt? Is it correct that we always need to add `<>` in generic types? 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-09 08:16:18 +00:00
Aleksey Kladov
e0b1c17dcb add <> when completing generic types 2019-10-08 21:14:52 +03:00
Aleksey Kladov
f4fa98b1bf simplify 2019-10-08 20:34:30 +03:00
Aleksey Kladov
5144f3b22f refactor 2019-10-08 20:33:43 +03:00
Aleksey Kladov
2f85a640a2 refactor 2019-10-08 20:32:19 +03:00
bors[bot]
06a8deae4a
Merge #1969
1969: restore coloring of attributes r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-08 11:55:27 +00:00
Aleksey Kladov
6503add6e3 restore coloring of attributes 2019-10-08 14:52:03 +03:00
bors[bot]
92cf0eba93
Merge #1924
1924: Support inferring&completing `Self` type in enum/struct/union definitions r=ice1000 a=ice1000

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>

An attempt to fix #1908.
This code works, but I believe the implementation is ugly. Please give me suggestions!

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
2019-10-08 11:46:14 +00:00
Aleksey Kladov
857f419c9d hard-code nightly-only CFGs 2019-10-08 14:43:29 +03:00
Aleksey Kladov
972079c0e3 macro DSL for cfg in tests 2019-10-08 14:39:44 +03:00
ice1000
b043358be9 Address comments: fix docs, add completion test for Self. 2019-10-08 07:32:41 -04:00
Aleksey Kladov
355419d404 use slightly more idiomatic api for cfg 2019-10-08 14:22:49 +03:00
bors[bot]
93199002af
Merge #1922
1922: feat(assists): Make raw string unescaped r=matklad a=Geobert

Last piece of https://github.com/rust-analyzer/rust-analyzer/issues/1730

Co-authored-by: Geobert Quach <geobert@protonmail.com>
2019-10-08 09:52:22 +00:00
bors[bot]
d9338dfa98
Merge #1951
1951: Lower the precedence of the `as` operator. r=matklad a=goffrie

Previously, the `as` operator was being parsed like a postfix expression, and
therefore being given the highest possible precedence. That caused it to bind
more tightly than prefix operators, which it should not. Instead, parse it
somewhat like a normal binary expression with some special-casing.

Fixes #1851.

Co-authored-by: Geoffry Song <goffrie@gmail.com>
2019-10-08 08:44:26 +00:00
bors[bot]
523d7d2c82
Merge #1966
1966: use lockfile in cargo install r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-08 06:35:52 +00:00
Aleksey Kladov
7665e444c0 use lockfile in cargo install 2019-10-08 09:35:27 +03:00
ice1000
6bad638928 Support inferring Self type in enum definitions
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
2019-10-07 19:40:14 -04:00
bors[bot]
c73193efe2
Merge #1963
1963: proc-macro2 1.0.5 r=matklad a=kjeremy

Has performance improvements. See https://github.com/alexcrichton/proc-macro2/issues/198

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-10-07 13:43:43 +00:00
Jeremy Kolb
131289a71b proc-macro2 1.0.5 2019-10-07 09:35:08 -04:00
Geoffry Song
b4fe06bc17 Move tests around 2019-10-05 16:33:05 -07:00
bors[bot]
d3872964f8
Merge #1960
1960: Replace AST visitors with macro r=viorina a=viorina

Fixes #1672.

Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-10-05 14:54:25 +00:00
Ekaterina Babshukova
311dbb8545 remove visitor module 2019-10-05 17:48:31 +03:00
bors[bot]
ae6305b90c
Merge #1928
1928: Support `#[cfg(..)]` r=matklad a=oxalica

This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled.
Front-end settings are **not** included in this PR.

There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949

Fixes #1920 

Related: #1073 


Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
2019-10-05 14:25:59 +00:00
Ekaterina Babshukova
2fc2290173 replace AST visitors with macro 2019-10-05 17:03:03 +03:00
oxalica
c6303d9fee
Use raw cfgs in json project and fix typo 2019-10-05 20:55:27 +08:00
bors[bot]
dbf869b4d2
Merge #1952
1952: Create an assist for applying De Morgan's Law r=matklad a=cronokirby

Fixes #1807

This assist can transform expressions of the form `!x || !y` into
`!(x && y)`. This also works with `&&`.

This assist will only trigger if the cursor is on the central logical
operator.

The main limitation of this current implementation is that both operands
need to be an explicit negation, either of the form `!x`, or `x != y`.
More operands could be accepted, but this would complicate the implementation
quite a bit.

Co-authored-by: Lúcás Meier <cronokirby@gmail.com>
2019-10-05 09:09:38 +00:00
bors[bot]
cce32719cf
Merge #1957
1957: Add alternative setup instruction for vim/neovim r=matklad a=Luke-Nukem

Provide another option hint for vim/neovim users who do not want to run nodejs

Co-authored-by: Luke Jones <luke@ljones.dev>
2019-10-04 21:51:44 +00:00
bors[bot]
7359bb94a8
Merge #1956
1956: don't keep history for gh-pages r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-04 21:41:59 +00:00
Luke Jones
4bc4cd71b2
Add alternative setup instruction for vim/neovim
Provide another option hint for vim/neovim users who do not want to run nodejs
2019-10-05 10:41:04 +13:00
Aleksey Kladov
f749a1b846 don't keep history for gh-pages
docs weigh a lot, and change a lot. Keeping their changes in history
inflates repo size. By specifying `keep-history: false` we should be
able to avoid that.
2019-10-05 00:40:35 +03:00
Geobert Quach
31663c1368 feat(assists): Address some PR comments 2019-10-04 18:32:14 +01:00
Lúcás Meier
e06ad80d49
Fix typo about De Morgan's law assist 2019-10-04 12:45:22 +02:00
Lúcás Meier
fe8ec1c045 [#1807] Add entry in docs/user/features 2019-10-04 11:03:46 +02:00