Commit graph

5427 commits

Author SHA1 Message Date
bors[bot]
8046f5b24a
Merge #2125
2125: don't add macro braces in use items r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-30 07:40:23 +00:00
Aleksey Kladov
d7a7da8261 don't add macro braces in use items 2019-10-30 10:39:12 +03:00
bors[bot]
00bc907969
Merge #2122
2122: bump smallvec and unicode-segmentation r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-10-29 22:10:29 +00:00
kjeremy
f3086dcc9c bump smallvec and unicode-segmentation 2019-10-29 18:09:49 -04:00
bors[bot]
3bd3f50578
Merge #2120
2120: Profile all request handlers r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-10-29 20:11:33 +00:00
kjeremy
3c140050ff Profile all request handlers 2019-10-29 16:08:36 -04:00
bors[bot]
542bc18223
Merge #2119
2119: Add missing test for label r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-10-29 19:26:39 +00:00
kjeremy
4ca5d4c353 Add missing test for label 2019-10-29 15:25:31 -04:00
bors[bot]
da0c719575
Merge #2117
2117: Don't add a space after the opening brace in autoimport r=matklad a=flodiebold

This seems almost intentional, being visible in quite a few tests, but it's rather annoying to me 😕 

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-10-29 17:24:01 +00:00
Florian Diebold
47cfdb4aa3 Don't add a space after the opening brace in autoimport 2019-10-29 18:14:15 +01:00
bors[bot]
0290fa5fa3
Merge #2116
2116: Basic signature help for mbe r=matklad a=kjeremy

This is really basic and just adds info and docs. Does something like this even make sense to have? I wasn't sure how to handle arguments so left them empty for now.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-10-29 16:46:46 +00:00
kjeremy
eb220a081b Primitive signature help for mbe 2019-10-29 12:16:55 -04:00
bors[bot]
de16f94ada
Merge #2103
2103: Expand signature help r=matklad a=kjeremy

Signature help using call syntax with tuple structs and enum variants

Fixes #2102.

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-10-29 13:48:26 +00:00
kjeremy
b915bf2d05 SigKind -> CallableKind 2019-10-29 09:46:55 -04:00
bors[bot]
e38cdf6e56
Merge #2114
2114: Move macro expansion to a separate crate r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-29 13:19:45 +00:00
Aleksey Kladov
bca708ba4c cleanup 2019-10-29 16:19:08 +03:00
Aleksey Kladov
99b6ecfab0 switch expand to dyn Trait 2019-10-29 16:12:54 +03:00
Aleksey Kladov
3260639608 reduce visibility 2019-10-29 16:08:06 +03:00
Aleksey Kladov
1ec418c3b8 add doc comment 2019-10-29 16:03:29 +03:00
Aleksey Kladov
7de6eaa58a remove not that useful indirection 2019-10-29 16:01:14 +03:00
Aleksey Kladov
b8b7969bfb remove empty module 2019-10-29 15:53:25 +03:00
Aleksey Kladov
2a5254c106 reduce visibility 2019-10-29 15:25:46 +03:00
Aleksey Kladov
d095d9273e remove unused query 2019-10-29 15:22:20 +03:00
Aleksey Kladov
858dd48af2 less generics 2019-10-29 15:20:08 +03:00
Aleksey Kladov
6bf7faf315 flatten hir_expand 2019-10-29 15:11:42 +03:00
bors[bot]
e960414a4d
Merge #2113
2113: Upgrade Chalk, make use of TypeName::Error variant r=flodiebold a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-10-29 12:03:38 +00:00
Aleksey Kladov
dba767802d make file id repr private again 2019-10-29 15:01:55 +03:00
Florian Diebold
632a22ae62 Upgrade Chalk, make use of TypeName::Error variant 2019-10-29 13:01:33 +01:00
Aleksey Kladov
5b803055b7 rename hir_def -> hir_expand 2019-10-29 14:59:55 +03:00
Aleksey Kladov
5413875644 move expansion-related code to a separate crate 2019-10-29 14:55:39 +03:00
bors[bot]
4f22d2f3b0
Merge #2112
2112: start ra_hir_def crate r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-29 08:20:02 +00:00
Aleksey Kladov
77f90caf2d start ra_hir_def crate 2019-10-29 11:15:51 +03:00
bors[bot]
120000609a
Merge #2111
2111: Fix autoimport not choosing the deepest use tree in some situations r=matklad a=flodiebold



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-10-28 19:32:52 +00:00
Florian Diebold
6d1b4ffa2e Fix autoimport not choosing the deepest use tree in some situations 2019-10-28 19:08:56 +01:00
bors[bot]
52c34c614b
Merge #2110
2110: weaken requirements of AstDef r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-28 17:30:22 +00:00
Aleksey Kladov
54d3e47318 weaken requirements of AstDef 2019-10-28 20:29:57 +03:00
kjeremy
01238a6fd7 Filter out non callable versions of Struct/EnumVariant 2019-10-28 10:48:40 -04:00
Jeremy Kolb
ddf25e9481 formatting 2019-10-28 08:42:17 -04:00
bors[bot]
1ca41f2118
Merge #2108
2108: fix parsing of for loops inside expressions r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-10-28 12:41:59 +00:00
Aleksey Kladov
5a6db3ca29 fix parsing of for loops inside expressions
closes #2051
2019-10-28 15:41:34 +03:00
Jeremy Kolb
44f2805fee Fix syntax 2019-10-28 08:32:23 -04:00
Jeremy Kolb
49e89772f6 Preliminary enum variant support 2019-10-28 08:32:22 -04:00
Jeremy Kolb
55d4b06a53 Add disciminant 2019-10-28 08:32:22 -04:00
Jeremy Kolb
5a59bc9fcb WIP: Expand signature help
This is hacky but works for tuple structs. Proof of concept.
2019-10-28 08:32:22 -04:00
bors[bot]
02828520a7
Merge #2097
2097: Be more precise with function signatures r=matklad a=kjeremy

Finds the closest call expr.

Fixes #2093

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-10-28 11:53:16 +00:00
bors[bot]
d9cbffe8a0
Merge #2105
2105: Update crates r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-10-28 02:47:36 +00:00
Jeremy Kolb
03adea962a Update crates 2019-10-27 22:44:33 -04:00
bors[bot]
bbd0fbd98d
Merge #2101
2101: Preserve whitespace at the end of doc comments r=matklad a=kjeremy

Whitespace can have special meaning in markdown. For instance ending a line with three spaces will render a new line.

Note that this behavior diverges from RLS.

Fixes #1997

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-10-27 21:00:16 +00:00
Jeremy Kolb
1438f38eb6 Preserve whitespace at the end of doc comments
Whitespace can have special meaning in markdown. For instance
ending a line with three spaces will render a new line.
Note that this behavior diverges from RLS.

Fixes #1997
2019-10-27 16:56:25 -04:00
bors[bot]
46b63c462d
Merge #2099
2099: Fix panic on raw string assist r=matklad a=aee11

Strings that do not contain two quotation marks would cause a slice indexing panic because `find_usual_string_range` would return a range that only contained a single quotation mark.
Panic example:
```
fn main() {
    let s = "<|>
}
```

I noticed a lot of panics from the `make_raw_string` assist while working on another issue today.

Co-authored-by: Alexander Elís Ebenesersson <alex2789@gmail.com>
2019-10-27 19:20:01 +00:00