Commit Graph

14945 Commits

Author SHA1 Message Date
Aleksey Kladov
d35bda6429 Make always-assert crate reusable 2021-01-26 22:13:42 +03:00
bors[bot]
2664aee8e5
Merge #7405
7405: fill_match_arms: don't duplicate Ident-like arms r=matklad a=bugadani



Co-authored-by: Dániel Buga <bugadani@gmail.com>
2021-01-26 13:57:10 +00:00
Dániel Buga
789efede82 Add failing test case 2021-01-26 14:48:03 +01:00
Aleksey Kladov
2870e70163 Add config option to ignore directories 2021-01-26 16:45:54 +03:00
Aleksey Kladov
a733f65126 Allow non-absolute paths to rust source 2021-01-26 16:40:08 +03:00
bors[bot]
e0f2e1560f
Merge #7450
7450: Remove the need to manually sync config in package.json r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-26 13:24:04 +00:00
Aleksey Kladov
c04b561e7e Remove the need to manually sync config in package.json 2021-01-26 16:22:24 +03:00
bors[bot]
d0d2786d2d
Merge #7433
7433: Support Macro v2 in mbe r=jonas-schievink a=edwin0cheng

Added `mbe::MacroDef` for Macro v2.

cc @jonas-schievink 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-01-26 13:08:35 +00:00
bors[bot]
19dc5195d0
Merge #7393
7393: Document `paths` items r=matklad a=arnaudgolfouse



Co-authored-by: Arnaud <arnaud.golfouse@laposte.net>
2021-01-26 12:29:47 +00:00
bors[bot]
3a5cd6bbc6
Merge #7406
7406: if_let_match: don't assume happy path r=matklad a=bugadani

Closes #7392

Co-authored-by: Dániel Buga <bugadani@gmail.com>
2021-01-26 12:12:45 +00:00
bors[bot]
21660f1d97
Merge #7445
7445: Document design label r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-26 11:19:03 +00:00
Aleksey Kladov
2be55703d1 Document design label 2021-01-26 14:18:28 +03:00
bors[bot]
2f223d8c15
Merge #7438
7438: Shorten hir::TypeParam ranges for traits in NavigationTarget r=matklad a=Veykril

I noticed that selecting `Self` here highlights the entire trait,
![Code_a8DMOEUuWY](https://user-images.githubusercontent.com/3757771/105779993-d2592c00-5f6f-11eb-81d1-bd99f9369cf7.png)
this should cut it down to just the trait name and the `Self` which imo seems better.
![image](https://user-images.githubusercontent.com/3757771/105780410-ac805700-5f70-11eb-882b-10ed63b951f2.png)


Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-26 06:35:20 +00:00
Lukas Wirth
d912444cac Shorten hir::TypeParam full_range in NavigationTarget 2021-01-26 01:01:00 +01:00
Edwin Cheng
ce4eeec1bf Support Macro v2 in mbe 2021-01-26 05:15:47 +08:00
bors[bot]
aa91a0268b
Merge #7430
7430: Simplify file download code r=matklad a=lnicola

This avoids leaving the user with no LSP binary available if their network goes down during the download, and should not keep the current behavior: overwriting a running executable works on Unix and fails on Windows.

It also removes the `overwrite` argument, which is always enabled and wasn't working anyway.

Nominally closes #3896 (although that's already fixed)

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 18:40:57 +00:00
bors[bot]
a37091d2d0
Merge #7431
7431: Handle `super` paths inside blocks correctly r=jonas-schievink a=jonas-schievink

We now intern `BlockLoc` and use `BlockId` to refer to block expressions. This is needed to keep `ModuleId` simple, since it would otherwise have to store an arbitrarily long chain of blocks and couldn't be `Copy`.

The `DefMap` hierarchy is now created as the caller descends into an item body. This is necessary to link the correct module as the block's parent, which is important for correct name resolution.

As a result, we can now resolve `super` paths inside block expressions by climbing the `DefMap` chain.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-25 18:24:04 +00:00
Jonas Schievink
08253d5473 Traverse parent DefMap for super paths 2021-01-25 19:15:39 +01:00
Jonas Schievink
98a88ebb9e Intern block locations and handle them in ModuleId 2021-01-25 19:02:05 +01:00
Laurențiu Nicola
03a1da9d46 Simplify file download code 2021-01-25 19:12:54 +02:00
vsrs
185cd736a6 Add RA_WAIT_DBG and docs 2021-01-25 17:46:03 +03:00
vsrs
3f0e34e08e Add "Win Attach to Server" debug configuration 2021-01-25 17:46:03 +03:00
vsrs
8c843d1dac Add the ability to wait for a debugger. 2021-01-25 17:46:03 +03:00
vsrs
98d7512e93 Add stderr flush 2021-01-25 17:46:03 +03:00
vsrs
43fabfbe36 Add --no-buffering flag for the file logging. 2021-01-25 17:46:03 +03:00
bors[bot]
2c735ed734
Merge #7426
7426: Create all `ModuleId`s through a `DefMap` method r=jonas-schievink a=jonas-schievink

`ModuleId` needs to be able to represent blocks, and only the
associated `DefMap` will know how to construct that `ModuleId`

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-25 14:22:24 +00:00
Jonas Schievink
5c241b0766 Create all ModuleIds through a DefMap method
`ModuleId` needs to be able to represent blocks, and only the
associated `DefMap` will know how to construct that `ModuleId`
2021-01-25 15:21:33 +01:00
bors[bot]
0a6b2b7846
Merge #7424
7424: Derive Default on ItemTree r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 12:31:48 +00:00
bors[bot]
82af033f2f
Merge #7425
7425: Fix typo in style guide r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 12:15:16 +00:00
Laurențiu Nicola
f0cffb66b3 Fix typo in style guide 2021-01-25 14:14:43 +02:00
Laurențiu Nicola
5ed5a542fb Derive Default on ItemTree 2021-01-25 14:12:53 +02:00
bors[bot]
a6a5b02f4c
Merge #7422
7422: Disallow non-boolean literals in concat! r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 11:35:37 +00:00
Laurențiu Nicola
4e92681aba Disallow non-boolean literals in concat! 2021-01-25 13:31:03 +02:00
bors[bot]
83231dd987
Merge #7409 #7421
7409: Add References CodeLens. r=matklad a=vsrs

Closes #5836

7421: Fix RA_LOG example in dev docs r=lnicola a=lnicola

bors r+

Co-authored-by: vsrs <vit@conrlab.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 11:18:58 +00:00
Laurențiu Nicola
83fd639829 Fix RA_LOG example in dev docs 2021-01-25 13:18:24 +02:00
bors[bot]
6362b399ad
Merge #7419
7419: Unquote strings when expanding concat! r=matklad a=lnicola

Fixes #7417.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 11:04:23 +00:00
Laurențiu Nicola
ee8c678870 Unquote strings and handle boolean literals in concat! 2021-01-25 13:02:57 +02:00
bors[bot]
1cd5a6cd41
Merge #7418
7418: ⬆️ rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-25 09:33:04 +00:00
Aleksey Kladov
1df711b95c ⬆️ rowan 2021-01-25 12:32:35 +03:00
bors[bot]
911ff38eae
Merge #7415
7415: Code: reduce progress notification spam r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-25 08:34:36 +00:00
Laurențiu Nicola
5bd84716ed Code: reduce progress notification spam 2021-01-25 10:05:38 +02:00
bors[bot]
3ab8d7a9ae
Merge #7414
7414: Add validation for mutable const items r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-24 01:18:58 +00:00
Lukas Wirth
70d43c3faf Add validation for mutable const items 2021-01-24 02:17:41 +01:00
bors[bot]
a7a1bb444d
Merge #7413
7413: Handle unions in symbol search r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-24 00:42:59 +00:00
Lukas Wirth
a872ebf81f Support unions in symbol search 2021-01-24 01:32:52 +01:00
bors[bot]
89fef5307e
Merge #7411
7411: cargo update r=kjeremy a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2021-01-23 16:30:26 +00:00
Jeremy Kolb
ea1683ea96 cargo update 2021-01-23 11:28:59 -05:00
vsrs
3618c4e0d3 Add References code lens.
For Struct, Enum, Union and Trait symbols.
2021-01-23 16:56:20 +03:00
bors[bot]
fb2b9c7212
Merge #7062
7062: Add diagnostic for filter_map followed by next r=theotherphil a=theotherphil

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1725

Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
2021-01-23 08:42:45 +00:00
Phil Ellison
db6dda94a3 Remove use of SourceFileEdit 2021-01-23 07:54:45 +00:00