Evgenii P
475a93097f
Use Source in Diagnostic and implement
2019-08-12 23:06:08 +07:00
Aleksey Kladov
13eddd7c49
Drop support for old extendSelection API
...
Emacs now handles this via native LSP request
dc86bbb227
2019-08-12 13:49:28 +03:00
Kirill Bulatov
2c5c35bdae
Always set the runnable name
2019-08-09 23:34:14 +03:00
Kirill Bulatov
726535a44e
Extract common logic
2019-08-09 22:19:34 +03:00
Kirill Bulatov
918addee23
Show backtraces in lens runnables
2019-08-09 21:42:04 +03:00
Aleksey Kladov
f3ee5a1509
Move numeric names inside of NameRef
2019-08-09 12:16:47 +02:00
Evgenii P
fa24e20867
Make name_ref to accept numeric names optionally
2019-08-09 16:08:36 +07:00
Evgenii P
957b5ed23a
Parse tuple struct field initialization
2019-08-09 15:38:52 +07:00
Evgenii P
db4839033c
Change macro to function
2019-08-09 15:04:13 +07:00
Evgenii P
073cf42391
rustfmt
2019-08-09 14:23:13 +07:00
Evgenii P
f4a6d92050
Reduce code duplication in lexer by introducing small macro
2019-08-09 14:08:34 +07:00
bors[bot]
87608904f6
Merge #1661
...
1661: Parse function parameters attributes r=matklad a=eupn
Fixes #1397 . The [RFC-2565](https://github.com/rust-lang/rfcs/blob/master/text/2565-formal-function-parameter-attributes.md ) specifies `#[attributes]` to function parameters:
```rust
fn foo(#[attr] a, #[unused] b, #[must_use] ...) {
// ...
}
```
This PR adds those attributes into grammar and to the parser, extending corresponding inline tests.
Co-authored-by: Evgenii P <eupn@protonmail.com>
2019-08-08 13:04:28 +00:00
Evgenii P
6fa2d82147
Fix parser tests according to review
2019-08-08 09:12:07 +07:00
Evgenii P
77f4ab3e9b
Deduplicate while loop break condition
2019-08-08 08:58:28 +07:00
Aleksey Kladov
d6ab1af086
assoc types bounds
2019-08-07 21:00:02 +02:00
Evgenii P
79d4202194
Fix parser to correctly consume outer attrs before ellipsis param
2019-08-08 00:36:19 +07:00
Evgenii P
9ea36703d2
Fix variadic arg inline test
2019-08-07 23:48:21 +07:00
Evgenii P
3fb58c620c
Add function parameters attributes
2019-08-07 23:42:28 +07:00
Aleksey Kladov
6efc79b89d
implement while let desugaring
2019-08-07 15:14:22 +02:00
Aleksey Kladov
39967a85e1
refactor if-let lowering
...
mainly to get rid of unwraps
2019-08-07 13:57:24 +02:00
Aleksey Kladov
4d6475ada0
refactor if lowering
2019-08-07 12:32:32 +02:00
Aleksey Kladov
a2966944a8
install server first
...
closes #1658
2019-08-07 12:12:23 +02:00
bors[bot]
7e12422fa2
Merge #1652
...
1652: Improve type hints behavior r=matklad a=SomeoneToIgnore
This PR fixed the following type hints issues:
* Restructures the `InlayKind` enum contents based on the discussion here: https://github.com/rust-analyzer/rust-analyzer/pull/1606#issuecomment-515968055
* Races described in #1639
* Caches the latest decorations received for each file to show them the next time the file is opened (instead of a new server request)
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-08-06 16:50:49 +00:00
Aleksey Kladov
3d45da9bca
fix tests
2019-08-06 14:41:22 +02:00
Aleksey Kladov
deea8f52d9
allow to exclude certain files and directories
2019-08-06 14:28:31 +02:00
Aleksey Kladov
058c2daba1
push glob errors outwards
2019-08-06 14:28:31 +02:00
Aleksey Kladov
f70b7e1f07
rename config
2019-08-06 14:28:31 +02:00
Aleksey Kladov
34203256bf
introduce ra_vfs_glob crate
...
It manages exclusion rules for the vfs crate
2019-08-06 14:28:31 +02:00
Aleksey Kladov
6cf56b6615
cleanup imports
2019-08-06 10:57:16 +02:00
Aleksey Kladov
d751bd08bf
cleanup
2019-08-06 10:57:16 +02:00
Aleksey Kladov
0e4a542cfb
rename
2019-08-06 10:50:32 +02:00
Aleksey Kladov
27303da419
use Conv for severity
2019-08-06 09:50:00 +02:00
Laurențiu Nicola
f1cfd5ec3d
Update crates/ra_cli/src/analysis_stats.rs
...
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-05 16:53:54 +03:00
Laurențiu Nicola
b118f7511c
Optimize Parser::is_composite a little
2019-08-05 16:53:54 +03:00
Laurențiu Nicola
6f5ac06b47
Display the parsing time in ra_cli analysis-stats
2019-08-05 16:53:54 +03:00
bors[bot]
a490f80a9c
Merge #1642
...
1642: Add test for #1540 r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-08-05 10:12:24 +00:00
Kirill Bulatov
3fb6462d54
Style and test fixes
2019-08-05 01:02:36 +03:00
Kirill Bulatov
15411d4474
Use proper inlay kinds
2019-08-05 00:28:36 +03:00
bors[bot]
4912cc35af
Merge #1634
...
1634: Implement .await completion for futures r=flodiebold a=eupn
Closes #1263 with completion for `.await` syntax for types that are implementing `std::future::Future` trait.
r? @flodiebold
Co-authored-by: Evgenii P <eupn@protonmail.com>
2019-08-04 09:42:17 +00:00
bors[bot]
658382c1f5
Merge #1640
...
1640: Bump deps r=matklad a=lnicola
`insta`, `unicode-xid` and others
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2019-08-04 08:12:12 +00:00
Laurențiu Nicola
5153001889
Bump deps
2019-08-04 10:43:51 +03:00
Evgenii P
9f9c5aa659
rustfmt
2019-08-04 08:45:14 +07:00
Evgenii P
8597af8ed4
Idiomatic return
2019-08-04 08:08:46 +07:00
Evgenii P
d610adfc2b
Employ early return pattern more
2019-08-04 08:03:17 +07:00
Evgenii P
4034ea9e4e
source_binder.rs: fix order of imports
2019-08-04 07:56:29 +07:00
Jeremy Kolb
e99d3da6c2
Add test for #1540
2019-08-03 18:01:48 -04:00
bors[bot]
0e94d07b9c
Merge #1638
...
1638: Avoid cloning a TtToken in SubtreeTokenSource::mk_token r=matklad a=lnicola
According to `perf record`, this function is the hottest one while running `ra_cli analysis-stats`:
Before:
```
6.05% ra_cli ra_cli <ra_mbe::subtree_source::SubtreeTokenSource as ra_parser::TokenSource>::lookahead_nth
5.56% ra_cli ra_cli <rowan::green::GreenNode as core:#️⃣ :Hash>::hash
4.16% ra_cli libc-2.29.so _int_malloc
3.93% ra_cli ra_cli ra_mbe::subtree_source::SubtreeTokenSource::get
Database loaded, 255 roots, 231.676882ms
Crates in this dir: 27
Total modules found: 282
Total declarations: 9642
Total functions: 3287
Total expressions: 64616
Expressions of unknown type: 9111 (14%)
Expressions of partially unknown type: 3417 (5%)
Analysis: 24.012797561s, 0b allocated 0b resident
target/release/ra_cli analysis-stats 24.60s user 0.56s system 100% cpu 25.125 total
```
After:
```
5.85% ra_cli ra_cli <rowan::green::GreenNode as core:#️⃣ :Hash>::hash
4.55% ra_cli libc-2.29.so _int_malloc
4.31% ra_cli ra_cli ra_parser::parser::Parser::nth
3.61% ra_cli ra_cli <ra_syntax::parsing::text_token_source::TextTokenSource as ra_parser::TokenSource>::lookahead_nth
3.54% ra_cli ra_cli ra_syntax::syntax_node::SyntaxTreeBuilder::finish_node
3.46% ra_cli libc-2.29.so _int_free
3.12% ra_cli libc-2.29.so malloc
2.76% ra_cli ra_cli ra_parser::event::process
2.68% ra_cli ra_cli alloc::sync::Arc<T>::drop_slow
2.50% ra_cli ra_cli ra_mbe::subtree_source::SubtreeTokenSource::get
2.31% ra_cli ra_cli <smol_str::SmolStr as core:#️⃣ :Hash>::hash
2.04% ra_cli libc-2.29.so __memmove_avx_unaligned_erms
1.92% ra_cli ra_cli <ra_mbe::subtree_source::SubtreeTokenSource as ra_parser::TokenSource>::lookahead_nth
Database loaded, 255 roots, 236.176803ms
Crates in this dir: 27
Total modules found: 282
Total declarations: 9642
Total functions: 3287
Total expressions: 64620
Expressions of unknown type: 9107 (14%)
Expressions of partially unknown type: 3425 (5%)
Analysis: 22.562328486s, 0b allocated 0b resident
target/release/ra_cli analysis-stats 23.12s user 0.57s system 100% cpu 23.659 total
```
r? @edwin0cheng, @matklad
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2019-08-03 20:07:07 +00:00
Laurențiu Nicola
f52437371f
Return a Ref from SubtreeTokenSource::get
2019-08-03 22:49:47 +03:00
bors[bot]
c5bdd02503
Merge #1630
...
1630: Removes `*/` from block doc comments r=matklad a=kjeremy
The trailing `/` was annoying me on hover.
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-08-03 19:25:30 +00:00
Laurențiu Nicola
e58baaa5a1
Avoid cloning a TtToken in SubtreeTokenSource::mk_token
2019-08-03 21:21:09 +03:00