]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Fri, 9 Aug 2019 10:17:47 +0000 (10:17 +0000)]
Merge #1673
1673: Move numeric names inside of `NameRef` r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 9 Aug 2019 10:16:47 +0000 (12:16 +0200)]
Move numeric names inside of `NameRef`
bors[bot] [Fri, 9 Aug 2019 09:21:50 +0000 (09:21 +0000)]
Merge #1669
1669: Parse tuple struct field initialization r=matklad a=eupn
Closes #1218.
This PR modifies the parser to accept the following code:
```rust
fn main() {
struct TupleStruct(usize);
let s = TupleStruct {
0: 1usize,
};
dbg!(s.0);
}
```
<details><summary>with following AST:</summary>
```
SOURCE_FILE@[0; 118)
FN_DEF@[0; 116)
FN_KW@[0; 2) "fn"
WHITESPACE@[2; 3) " "
NAME@[3; 7)
IDENT@[3; 7) "main"
PARAM_LIST@[7; 9)
L_PAREN@[7; 8) "("
R_PAREN@[8; 9) ")"
WHITESPACE@[9; 10) " "
BLOCK@[10; 116)
L_CURLY@[10; 11) "{"
WHITESPACE@[11; 16) "\n "
STRUCT_DEF@[16; 42)
STRUCT_KW@[16; 22) "struct"
WHITESPACE@[22; 23) " "
NAME@[23; 34)
IDENT@[23; 34) "TupleStruct"
POS_FIELD_DEF_LIST@[34; 41)
L_PAREN@[34; 35) "("
POS_FIELD_DEF@[35; 40)
PATH_TYPE@[35; 40)
PATH@[35; 40)
PATH_SEGMENT@[35; 40)
NAME_REF@[35; 40)
IDENT@[35; 40) "usize"
R_PAREN@[40; 41) ")"
SEMI@[41; 42) ";"
WHITESPACE@[42; 47) "\n "
LET_STMT@[47; 94)
LET_KW@[47; 50) "let"
WHITESPACE@[50; 51) " "
BIND_PAT@[51; 52)
NAME@[51; 52)
IDENT@[51; 52) "s"
WHITESPACE@[52; 53) " "
EQ@[53; 54) "="
WHITESPACE@[54; 55) " "
STRUCT_LIT@[55; 93)
PATH@[55; 66)
PATH_SEGMENT@[55; 66)
NAME_REF@[55; 66)
IDENT@[55; 66) "TupleStruct"
WHITESPACE@[66; 67) " "
NAMED_FIELD_LIST@[67; 93)
L_CURLY@[67; 68) "{"
WHITESPACE@[68; 77) "\n "
NAMED_FIELD@[77; 86)
NAME_REF@[77; 78)
INT_NUMBER@[77; 78) "0"
COLON@[78; 79) ":"
WHITESPACE@[79; 80) " "
LITERAL@[80; 86)
INT_NUMBER@[80; 86) "1usize"
COMMA@[86; 87) ","
WHITESPACE@[87; 92) "\n "
R_CURLY@[92; 93) "}"
SEMI@[93; 94) ";"
WHITESPACE@[94; 104) "\n \n "
EXPR_STMT@[104; 114)
MACRO_CALL@[104; 113)
PATH@[104; 107)
PATH_SEGMENT@[104; 107)
NAME_REF@[104; 107)
IDENT@[104; 107) "dbg"
EXCL@[107; 108) "!"
TOKEN_TREE@[108; 113)
L_PAREN@[108; 109) "("
IDENT@[109; 110) "s"
DOT@[110; 111) "."
INT_NUMBER@[111; 112) "0"
R_PAREN@[112; 113) ")"
SEMI@[113; 114) ";"
WHITESPACE@[114; 115) "\n"
R_CURLY@[115; 116) "}"
WHITESPACE@[116; 118) "\n\n"
```
</summary>
Co-authored-by: Evgenii P <eupn@protonmail.com>
Evgenii P [Fri, 9 Aug 2019 09:08:36 +0000 (16:08 +0700)]
Make name_ref to accept numeric names optionally
Evgenii P [Fri, 9 Aug 2019 08:38:52 +0000 (15:38 +0700)]
Parse tuple struct field initialization
bors[bot] [Fri, 9 Aug 2019 08:11:26 +0000 (08:11 +0000)]
Merge #1668
1668: Reduce code duplication in lexer r=matklad a=eupn
During an investigation of a fix for #1218, I stumbled upon some code duplication in the lexer.
Co-authored-by: Evgenii P <eupn@protonmail.com>
Evgenii P [Fri, 9 Aug 2019 08:04:13 +0000 (15:04 +0700)]
Change macro to function
Evgenii P [Fri, 9 Aug 2019 07:23:13 +0000 (14:23 +0700)]
rustfmt
Evgenii P [Fri, 9 Aug 2019 07:08:34 +0000 (14:08 +0700)]
Reduce code duplication in lexer by introducing small macro
bors[bot] [Thu, 8 Aug 2019 13:04:28 +0000 (13:04 +0000)]
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>
Evgenii P [Thu, 8 Aug 2019 02:12:07 +0000 (09:12 +0700)]
Fix parser tests according to review
Evgenii P [Thu, 8 Aug 2019 01:58:28 +0000 (08:58 +0700)]
Deduplicate while loop break condition
bors[bot] [Wed, 7 Aug 2019 19:00:38 +0000 (19:00 +0000)]
Merge #1664
1664: assoc types bounds r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 7 Aug 2019 19:00:02 +0000 (21:00 +0200)]
assoc types bounds
bors[bot] [Wed, 7 Aug 2019 18:31:37 +0000 (18:31 +0000)]
Merge #1663
1663: architecture.md: update path to parser tests r=matklad a=eupn
Co-authored-by: eupn <36292692+eupn@users.noreply.github.com>
bors[bot] [Wed, 7 Aug 2019 18:21:33 +0000 (18:21 +0000)]
Merge #1662
1662: architecture.md: "finish not Y" -> "finish node Y" r=matklad a=eupn
Is this a typo?
Co-authored-by: eupn <36292692+eupn@users.noreply.github.com>
Evgenii P [Wed, 7 Aug 2019 17:36:19 +0000 (00:36 +0700)]
Fix parser to correctly consume outer attrs before ellipsis param
eupn [Wed, 7 Aug 2019 17:23:10 +0000 (00:23 +0700)]
architecture.md: update path to parser tests
eupn [Wed, 7 Aug 2019 17:18:47 +0000 (00:18 +0700)]
architecture.md: "finish not Y" -> "finish node Y"
Is this a typo?
Evgenii P [Wed, 7 Aug 2019 16:48:21 +0000 (23:48 +0700)]
Fix variadic arg inline test
Evgenii P [Wed, 7 Aug 2019 16:42:28 +0000 (23:42 +0700)]
Add function parameters attributes
bors[bot] [Wed, 7 Aug 2019 13:16:06 +0000 (13:16 +0000)]
Merge #1660
1660: implement while let desugaring r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 7 Aug 2019 13:14:22 +0000 (15:14 +0200)]
implement while let desugaring
Aleksey Kladov [Wed, 7 Aug 2019 11:51:54 +0000 (13:51 +0200)]
refactor if-let lowering
mainly to get rid of unwraps
Aleksey Kladov [Wed, 7 Aug 2019 10:32:32 +0000 (12:32 +0200)]
refactor if lowering
bors[bot] [Wed, 7 Aug 2019 10:25:22 +0000 (10:25 +0000)]
Merge #1659
1659: install server first r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 7 Aug 2019 10:12:23 +0000 (12:12 +0200)]
install server first
closes #1658
bors[bot] [Tue, 6 Aug 2019 16:50:49 +0000 (16:50 +0000)]
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>
bors[bot] [Tue, 6 Aug 2019 12:54:49 +0000 (12:54 +0000)]
Merge #1657
1657: Ignore r=matklad a=matklad
closes #1616
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 6 Aug 2019 12:41:22 +0000 (14:41 +0200)]
fix tests
Aleksey Kladov [Tue, 6 Aug 2019 11:34:28 +0000 (13:34 +0200)]
allow to exclude certain files and directories
Aleksey Kladov [Tue, 6 Aug 2019 11:27:00 +0000 (13:27 +0200)]
push glob errors outwards
Aleksey Kladov [Tue, 6 Aug 2019 11:12:58 +0000 (13:12 +0200)]
rename config
Aleksey Kladov [Tue, 6 Aug 2019 11:00:37 +0000 (13:00 +0200)]
introduce ra_vfs_glob crate
It manages exclusion rules for the vfs crate
bors[bot] [Tue, 6 Aug 2019 12:09:45 +0000 (12:09 +0000)]
Merge #1656
1656: cargo update r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Tue, 6 Aug 2019 11:56:18 +0000 (07:56 -0400)]
cargo update
bors[bot] [Tue, 6 Aug 2019 08:59:53 +0000 (08:59 +0000)]
Merge #1655
1655: cleanup imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 6 Aug 2019 08:55:59 +0000 (10:55 +0200)]
cleanup imports
Aleksey Kladov [Tue, 6 Aug 2019 08:54:51 +0000 (10:54 +0200)]
cleanup
Aleksey Kladov [Tue, 6 Aug 2019 08:50:32 +0000 (10:50 +0200)]
rename
bors[bot] [Tue, 6 Aug 2019 07:50:41 +0000 (07:50 +0000)]
Merge #1654
1654: use Conv for severity r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 6 Aug 2019 07:29:06 +0000 (09:29 +0200)]
use Conv for severity
Kirill Bulatov [Mon, 5 Aug 2019 19:31:12 +0000 (22:31 +0300)]
Avoid shared mutable state
bors[bot] [Mon, 5 Aug 2019 13:55:17 +0000 (13:55 +0000)]
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>
Laurențiu Nicola [Mon, 5 Aug 2019 13:52:18 +0000 (16:52 +0300)]
Update crates/ra_cli/src/analysis_stats.rs
Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
Laurențiu Nicola [Sun, 4 Aug 2019 11:06:07 +0000 (14:06 +0300)]
Optimize Parser::is_composite a little
Laurențiu Nicola [Sun, 4 Aug 2019 10:49:13 +0000 (13:49 +0300)]
Display the parsing time in ra_cli analysis-stats
Kirill Bulatov [Mon, 5 Aug 2019 10:31:00 +0000 (13:31 +0300)]
Cache decorations before the first change only
bors[bot] [Mon, 5 Aug 2019 10:12:24 +0000 (10:12 +0000)]
Merge #1642
1642: Add test for #1540 r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Kirill Bulatov [Mon, 5 Aug 2019 08:07:27 +0000 (11:07 +0300)]
Use WeakMap to avoid memory leaks
Kirill Bulatov [Sun, 4 Aug 2019 21:47:14 +0000 (00:47 +0300)]
Style and test fixes
Kirill Bulatov [Sun, 4 Aug 2019 21:28:36 +0000 (00:28 +0300)]
Use proper inlay kinds
Kirill Bulatov [Sun, 4 Aug 2019 21:23:58 +0000 (00:23 +0300)]
Query less hints on file open
bors[bot] [Sun, 4 Aug 2019 09:42:17 +0000 (09:42 +0000)]
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>
bors[bot] [Sun, 4 Aug 2019 08:12:12 +0000 (08:12 +0000)]
Merge #1640
1640: Bump deps r=matklad a=lnicola
`insta`, `unicode-xid` and others
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Sat, 3 Aug 2019 20:48:10 +0000 (23:48 +0300)]
Bump deps
Evgenii P [Sun, 4 Aug 2019 01:45:14 +0000 (08:45 +0700)]
rustfmt
Evgenii P [Sun, 4 Aug 2019 01:08:46 +0000 (08:08 +0700)]
Idiomatic return
Evgenii P [Sun, 4 Aug 2019 01:03:17 +0000 (08:03 +0700)]
Employ early return pattern more
Evgenii P [Sun, 4 Aug 2019 00:56:29 +0000 (07:56 +0700)]
source_binder.rs: fix order of imports
Jeremy Kolb [Sat, 3 Aug 2019 22:01:48 +0000 (18:01 -0400)]
Add test for #1540
bors[bot] [Sat, 3 Aug 2019 20:07:07 +0000 (20:07 +0000)]
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>::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>::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>::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>
Laurențiu Nicola [Sat, 3 Aug 2019 19:49:47 +0000 (22:49 +0300)]
Return a Ref from SubtreeTokenSource::get
bors[bot] [Sat, 3 Aug 2019 19:25:30 +0000 (19:25 +0000)]
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>
bors[bot] [Sat, 3 Aug 2019 19:15:02 +0000 (19:15 +0000)]
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>
Laurențiu Nicola [Sat, 3 Aug 2019 18:11:58 +0000 (21:11 +0300)]
Avoid cloning a TtToken in SubtreeTokenSource::mk_token
Alexander Andreev [Sat, 3 Aug 2019 16:44:59 +0000 (19:44 +0300)]
Resolve out of line modules inside inline module with attribute path
Fixed #1510
Fixed #1529
Evgenii P [Sat, 3 Aug 2019 10:07:20 +0000 (17:07 +0700)]
Use std::future::Future trait from stdlib
Evgenii P [Fri, 2 Aug 2019 19:48:36 +0000 (02:48 +0700)]
do fixup: remove unused imports in complete_dot.rs
Evgenii P [Fri, 2 Aug 2019 19:46:00 +0000 (02:46 +0700)]
do fixup: remove unused import
Evgenii P [Fri, 2 Aug 2019 19:40:59 +0000 (02:40 +0700)]
Change postfix completion to keyword completion
bors[bot] [Fri, 2 Aug 2019 18:58:11 +0000 (18:58 +0000)]
Merge #1633
1633: Update rls URL r=flodiebold a=tomhennigan
Docs folder was removed in rust-lang/compiler-team@
dbe0ee74e911693841a16727caab756ab4d0b9ab .
Co-authored-by: Tom Hennigan <tomhennigan@google.com>
Evgenii P [Fri, 2 Aug 2019 18:56:27 +0000 (01:56 +0700)]
Relax trait solving more for completion
Evgenii P [Fri, 2 Aug 2019 18:53:51 +0000 (01:53 +0700)]
Use future lang item instead of hardcoded std::future::Future
Evgenii P [Fri, 2 Aug 2019 18:16:20 +0000 (01:16 +0700)]
rustfmt
Evgenii P [Fri, 2 Aug 2019 18:15:43 +0000 (01:15 +0700)]
Implement completion for the .await syntax
Tom Hennigan [Fri, 2 Aug 2019 14:19:19 +0000 (15:19 +0100)]
Fix rls URL.
Docs folder was removed in rust-lang/compiler-team@
dbe0ee74e911693841a16727caab756ab4d0b9ab .
kjeremy [Wed, 31 Jul 2019 17:59:14 +0000 (13:59 -0400)]
Unconditionally trim the end of comments
bors[bot] [Wed, 31 Jul 2019 15:54:46 +0000 (15:54 +0000)]
Merge #1631
1631: Remove test comment r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 31 Jul 2019 15:53:47 +0000 (11:53 -0400)]
remove-comment
kjeremy [Wed, 31 Jul 2019 15:43:00 +0000 (11:43 -0400)]
Removes `*/` in block doc comments
bors[bot] [Wed, 31 Jul 2019 14:48:42 +0000 (14:48 +0000)]
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>
kjeremy [Wed, 31 Jul 2019 14:46:15 +0000 (10:46 -0400)]
Add explicit newline preserving tests
bors[bot] [Wed, 31 Jul 2019 14:10:28 +0000 (14:10 +0000)]
Merge #1628
1628: Update insta to 0.9.0 and cargo update r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 31 Jul 2019 14:05:00 +0000 (10:05 -0400)]
Update insta to 0.9.0 and cargo update
bors[bot] [Wed, 31 Jul 2019 12:09:22 +0000 (12:09 +0000)]
Merge #1627
1627: Hide ignored lines in rustdoc r=kjeremy a=rizakrko
This fixes #1620.
Co-authored-by: Roman Stoliar <rizakrko@rambler.ru>
Roman Stoliar [Tue, 30 Jul 2019 18:25:51 +0000 (21:25 +0300)]
Fixed review comments
bors[bot] [Tue, 30 Jul 2019 16:48:35 +0000 (16:48 +0000)]
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>
Evgenii P [Tue, 30 Jul 2019 14:02:29 +0000 (21:02 +0700)]
rustfmt
Evgenii P [Tue, 30 Jul 2019 13:33:58 +0000 (20:33 +0700)]
Fix flip comma assist
Roman Stoliar [Tue, 30 Jul 2019 00:46:38 +0000 (03:46 +0300)]
Hide comments in rust section of doc comments
bors[bot] [Mon, 29 Jul 2019 21:22:28 +0000 (21:22 +0000)]
Merge #1602
1602: Assist to merge identical match arms r=matklad a=theotherphil
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1250
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
Phil Ellison [Mon, 29 Jul 2019 20:59:52 +0000 (21:59 +0100)]
Add merge_match_arm assist, bump rowan to 0.6.1
bors[bot] [Mon, 29 Jul 2019 19:02:39 +0000 (19:02 +0000)]
Merge #1604
1604: Fix failing type interference for floating point literal r=matklad a=theotherphil
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1592
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
Phil Ellison [Mon, 29 Jul 2019 18:02:03 +0000 (19:02 +0100)]
Move assist test, add literal type inference test
bors[bot] [Mon, 29 Jul 2019 12:54:40 +0000 (12:54 +0000)]
Merge #1601
1601: Inline snapshots for tests r=matklad a=theotherphil
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1127.
The "cargo format" commits are required to get the formatting tests to pass. However, they actually mess up the formatting.
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
bors[bot] [Mon, 29 Jul 2019 12:44:14 +0000 (12:44 +0000)]
Merge #1621
1621: Document AssistBuilder r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 29 Jul 2019 12:43:34 +0000 (15:43 +0300)]
Document AssistBuilder
closes #1603
bors[bot] [Mon, 29 Jul 2019 12:30:39 +0000 (12:30 +0000)]
Merge #1606
1606: Add `if let`, `while let` and match arm inlay hints r=matklad a=SomeoneToIgnore
<img width="693" alt="image" src="https://user-images.githubusercontent.com/
2690773 /
62013363 -
152f1d80 -b19a-11e9-90ea-
07568757baa2 .png">
Add more inline hints support.
Looks like `while let` type inference support is missing currently, so the corresponding hint tests lack the actual results.
I've also could not find a good way to distinguish between `a` and `b` pats in the following expressions:
`if let Some(Test { a: None, b: y }) = &test {};`
In this case we don't need to add a hint for first pat (`a: None`), since it's matched against the particular enum variant and need a hint for `y`, since it's a new variable.
But both `a` and `b` are `BIND_PAT` with similar contents, so looks like there's nothing I can check for to find any differences.
I don't display any hints for such cases now, to avoid confusion, but would be nice to know if there's a way to fix this behavior.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
bors[bot] [Mon, 29 Jul 2019 12:19:08 +0000 (12:19 +0000)]
Merge #1605
1605: Resolve modules inside inline module r=matklad a=andreevlex
#1510
Co-authored-by: Alexander Andreev <andreevlex.as@gmail.com>