Commit Graph

15517 Commits

Author SHA1 Message Date
bors[bot]
ad3cb2125d
Merge #7468
7468: Enable fill_match_arms in macros r=Veykril a=Veykril

Fixes #3936

The indentation is a bit off, but I don't think it's worth trying to fix that up until we have a proper formatting thing set up, as this most likely requires some hand picked specializing making the implementation worse to read(Assuming this can even be fixed for all cases by hardcoding indentation fixes).

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-27 21:35:57 +00:00
Lukas Wirth
b883a52712 Enable fill_match_arms in macros 2021-01-27 22:32:40 +01:00
bors[bot]
671757a5de
Merge #7466
7466: Fix legacy macro resolution in block expressions r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-27 18:17:54 +00:00
Jonas Schievink
ad254f4c97 Fix legacy macro resolution in block expressions 2021-01-27 19:16:39 +01:00
bors[bot]
0ebf548ab7
Merge #7451
7451: rust-analyzer.files.excludeDirs r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-27 15:48:35 +00:00
bors[bot]
c76cab6247
Merge #7465
7465: Only hide parameter hints for path, field and methodcall expressions r=SomeoneToIgnore a=Veykril

Doing this check for other expressions makes little sense to me.

Fixes #7458

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-27 14:40:57 +00:00
Lukas Wirth
0aaa61cd56 Only hide parameter hints for path, field and methodcall expressions 2021-01-27 15:03:43 +01:00
bors[bot]
e3204c528b
Merge #7464
7464: Export `CARGO` for proc. macros r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-01-27 13:26:18 +00:00
Jonas Schievink
481a74eda7 Export CARGO for proc. macros 2021-01-27 14:25:51 +01:00
bors[bot]
6a6a80eb1f
Merge #7463
7463: Bump deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-01-27 12:22:55 +00:00
Laurențiu Nicola
efafcf2428 Bump deps 2021-01-27 14:22:19 +02:00
bors[bot]
34fb643f13
Merge #7461
7461: Squelch a warning r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-27 09:40:52 +00:00
Aleksey Kladov
5101f85da0 Squelch a warning 2021-01-27 12:40:15 +03:00
Aleksey Kladov
b8d50a7414 add more counts 2021-01-27 12:39:19 +03:00
bors[bot]
2d3266d111
Merge #7460
7460: add more counts r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-27 09:16:54 +00:00
Aleksey Kladov
181590412e add more counts 2021-01-27 12:16:24 +03:00
bors[bot]
fc08fdaf5a
Merge #7457
7457: Add no-buffering file logging and wait for a debugger option. r=vsrs a=vsrs

Adds two command line flags: `--no-buffering` and `--wait-dbg`. 

Not  sure if someone else needs this, but personally I found both flags extremely useful trying to figure out why RA does not work with Visual Studio. Or better to say why Visual Studio does not work with RA.

Co-authored-by: vsrs <vit@conrlab.com>
2021-01-26 22:37:11 +00:00
vsrs
5f1eb544da Apply suggestions. 2021-01-27 01:16:39 +03:00
vsrs
0269071283 cargo fmt 2021-01-27 00:33:27 +03:00
vsrs
ad603c3867 Add debug only guard for the --wait-dbg flag 2021-01-27 00:09:15 +03:00
bors[bot]
8775bc4be1
Merge #7455
7455: Make always-assert crate reusable r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-26 19:14:16 +00:00
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