Commit Graph

4938 Commits

Author SHA1 Message Date
bors[bot]
e01c6b4e1b Merge #1654
1654: use Conv for severity r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-06 07:50:41 +00:00
Aleksey Kladov
27303da419 use Conv for severity 2019-08-06 09:50:00 +02:00
Kirill Bulatov
c5598d9ade Avoid shared mutable state 2019-08-05 23:11:16 +03:00
bors[bot]
12a7329cb3 Merge #1648
1648: Optimize parsing a little r=lnicola a=lnicola

This is the change from https://github.com/rust-analyzer/rust-analyzer/issues/1643#issuecomment-517979911. In the long run we should probably take a different approach, but until then this provides a decent speed-up (10.5s vs 11.5s according to `ra_cli analysis-stats`.

EDIT: Does the profiling part make sense? I'm not sure if all parsing happens before the type inference begins or it's lazy.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2019-08-05 13:55:17 +00: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
Kirill Bulatov
777552b6a8 Cache decorations before the first change only 2019-08-05 13:41:02 +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
f358b4c0c0 Use WeakMap to avoid memory leaks 2019-08-05 11:14:18 +03: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
Kirill Bulatov
2c02aebeb5 Query less hints on file open 2019-08-05 00:23:58 +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
bors[bot]
e96c9e4865 Merge #1637
1637: Resolve out of line modules inside inline module with attribute path r=matklad a=andreevlex

Fixed #1510
Fixed #1529

Co-authored-by: Alexander Andreev <andreevlex.as@gmail.com>
2019-08-03 19:15:02 +00:00
Laurențiu Nicola
e58baaa5a1 Avoid cloning a TtToken in SubtreeTokenSource::mk_token 2019-08-03 21:21:09 +03:00
Alexander Andreev
83fe7b5fcb Resolve out of line modules inside inline module with attribute path
Fixed #1510
Fixed #1529
2019-08-03 19:44:59 +03:00
bravomikekilo
562359d706 fix block parse problem 2019-08-03 19:57:07 +08:00
Evgenii P
6a94f203fc Use std::future::Future trait from stdlib 2019-08-03 17:07:20 +07:00
Evgenii P
957de26a1d do fixup: remove unused imports in complete_dot.rs 2019-08-03 02:48:36 +07:00
Evgenii P
858736c477 do fixup: remove unused import 2019-08-03 02:46:00 +07:00
Evgenii P
40facb559a Change postfix completion to keyword completion 2019-08-03 02:40:59 +07:00
bors[bot]
0ca30b6c4b Merge #1633
1633: Update rls URL r=flodiebold a=tomhennigan

Docs folder was removed in rust-lang/compiler-team@dbe0ee74e9.

Co-authored-by: Tom Hennigan <tomhennigan@google.com>
2019-08-02 18:58:11 +00:00
Evgenii P
291bd81e74 Relax trait solving more for completion 2019-08-03 01:56:27 +07:00
Evgenii P
ab7774545c Use future lang item instead of hardcoded std::future::Future 2019-08-03 01:53:51 +07:00
Evgenii P
30bc3b93be rustfmt 2019-08-03 01:16:20 +07:00
Evgenii P
c417b98f02 Implement completion for the .await syntax 2019-08-03 01:15:43 +07:00
Tom Hennigan
609b1190c9
Fix rls URL.
Docs folder was removed in rust-lang/compiler-team@dbe0ee74e9.
2019-08-02 15:19:19 +01:00
kjeremy
0f61aa1f09 Unconditionally trim the end of comments 2019-07-31 13:59:14 -04:00
bors[bot]
831d39b0f7 Merge #1631
1631: Remove test comment r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-07-31 15:54:46 +00:00
kjeremy
8da8c147ee remove-comment 2019-07-31 11:53:47 -04:00
kjeremy
d65dc40348 Removes */ in block doc comments 2019-07-31 11:43:00 -04:00
bors[bot]
7c0a9718aa Merge #1629
1629: Add explicit newline preserving tests r=matklad a=kjeremy

I didn't see anything that explicitly called this out so added tests.

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-07-31 14:48:42 +00:00
kjeremy
4fccad9b2c Add explicit newline preserving tests 2019-07-31 10:46:15 -04:00
bors[bot]
4a6cfa1aa7 Merge #1628
1628: Update insta to 0.9.0 and cargo update r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-07-31 14:10:28 +00:00
kjeremy
8d2068cf32 Update insta to 0.9.0 and cargo update 2019-07-31 10:05:00 -04:00
bors[bot]
1af7738c28 Merge #1627
1627: Hide ignored lines in rustdoc r=kjeremy a=rizakrko

This fixes #1620.

Co-authored-by: Roman Stoliar <rizakrko@rambler.ru>
2019-07-31 12:09:22 +00:00
Roman Stoliar
facc7a35a5 Fixed review comments 2019-07-30 21:25:51 +03:00
bors[bot]
457fdf90c8 Merge #1625
1625: Fix flip comma assist r=matklad a=eupn

Should fix and close #1619 🤔

r? @matklad 

Co-authored-by: Evgenii P <eupn@protonmail.com>
2019-07-30 16:48:35 +00:00
Evgenii P
06c3de310e rustfmt 2019-07-30 21:02:29 +07:00