]>
git.lizzy.rs Git - rust.git/log
Aleksey Kladov [Tue, 26 Jan 2021 19:11:12 +0000 (22:11 +0300)]
Make always-assert crate reusable
bors[bot] [Tue, 26 Jan 2021 13:57:10 +0000 (13:57 +0000)]
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>
Dániel Buga [Fri, 22 Jan 2021 22:15:38 +0000 (23:15 +0100)]
Add failing test case
bors[bot] [Tue, 26 Jan 2021 13:24:04 +0000 (13:24 +0000)]
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>
Aleksey Kladov [Tue, 26 Jan 2021 13:03:24 +0000 (16:03 +0300)]
Remove the need to manually sync config in package.json
bors[bot] [Tue, 26 Jan 2021 13:08:35 +0000 (13:08 +0000)]
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>
bors[bot] [Tue, 26 Jan 2021 12:29:47 +0000 (12:29 +0000)]
Merge #7393
7393: Document `paths` items r=matklad a=arnaudgolfouse
Co-authored-by: Arnaud <arnaud.golfouse@laposte.net>
bors[bot] [Tue, 26 Jan 2021 12:12:45 +0000 (12:12 +0000)]
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>
bors[bot] [Tue, 26 Jan 2021 11:19:03 +0000 (11:19 +0000)]
Merge #7445
7445: Document design label r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 26 Jan 2021 11:18:28 +0000 (14:18 +0300)]
Document design label
bors[bot] [Tue, 26 Jan 2021 06:35:20 +0000 (06:35 +0000)]
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>
Lukas Wirth [Mon, 25 Jan 2021 23:44:27 +0000 (00:44 +0100)]
Shorten hir::TypeParam full_range in NavigationTarget
Edwin Cheng [Mon, 25 Jan 2021 21:15:47 +0000 (05:15 +0800)]
Support Macro v2 in mbe
bors[bot] [Mon, 25 Jan 2021 18:40:57 +0000 (18:40 +0000)]
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>
bors[bot] [Mon, 25 Jan 2021 18:24:04 +0000 (18:24 +0000)]
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>
Jonas Schievink [Mon, 25 Jan 2021 18:15:39 +0000 (19:15 +0100)]
Traverse parent DefMap for `super` paths
Jonas Schievink [Mon, 25 Jan 2021 18:02:05 +0000 (19:02 +0100)]
Intern block locations and handle them in ModuleId
Laurențiu Nicola [Mon, 25 Jan 2021 17:12:54 +0000 (19:12 +0200)]
Simplify file download code
bors[bot] [Mon, 25 Jan 2021 14:22:24 +0000 (14:22 +0000)]
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>
Jonas Schievink [Mon, 25 Jan 2021 14:21:33 +0000 (15:21 +0100)]
Create all `ModuleId`s through a `DefMap` method
`ModuleId` needs to be able to represent blocks, and only the
associated `DefMap` will know how to construct that `ModuleId`
bors[bot] [Mon, 25 Jan 2021 12:31:48 +0000 (12:31 +0000)]
Merge #7424
7424: Derive Default on ItemTree r=lnicola a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Mon, 25 Jan 2021 12:15:16 +0000 (12:15 +0000)]
Merge #7425
7425: Fix typo in style guide r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Mon, 25 Jan 2021 12:14:43 +0000 (14:14 +0200)]
Fix typo in style guide
Laurențiu Nicola [Mon, 25 Jan 2021 12:12:53 +0000 (14:12 +0200)]
Derive Default on ItemTree
bors[bot] [Mon, 25 Jan 2021 11:35:37 +0000 (11:35 +0000)]
Merge #7422
7422: Disallow non-boolean literals in concat! r=lnicola a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Mon, 25 Jan 2021 11:30:55 +0000 (13:30 +0200)]
Disallow non-boolean literals in concat!
bors[bot] [Mon, 25 Jan 2021 11:18:58 +0000 (11:18 +0000)]
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>
Laurențiu Nicola [Mon, 25 Jan 2021 11:14:31 +0000 (13:14 +0200)]
Fix RA_LOG example in dev docs
bors[bot] [Mon, 25 Jan 2021 11:04:23 +0000 (11:04 +0000)]
Merge #7419
7419: Unquote strings when expanding concat! r=matklad a=lnicola
Fixes #7417.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Mon, 25 Jan 2021 10:53:44 +0000 (12:53 +0200)]
Unquote strings and handle boolean literals in concat!
bors[bot] [Mon, 25 Jan 2021 09:33:04 +0000 (09:33 +0000)]
Merge #7418
7418: :arrow_up: rowan r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 25 Jan 2021 09:32:35 +0000 (12:32 +0300)]
:arrow_up: rowan
bors[bot] [Mon, 25 Jan 2021 08:34:36 +0000 (08:34 +0000)]
Merge #7415
7415: Code: reduce progress notification spam r=lnicola a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Sun, 24 Jan 2021 14:13:33 +0000 (16:13 +0200)]
Code: reduce progress notification spam
bors[bot] [Sun, 24 Jan 2021 01:18:58 +0000 (01:18 +0000)]
Merge #7414
7414: Add validation for mutable const items r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sun, 24 Jan 2021 01:17:41 +0000 (02:17 +0100)]
Add validation for mutable const items
bors[bot] [Sun, 24 Jan 2021 00:42:59 +0000 (00:42 +0000)]
Merge #7413
7413: Handle unions in symbol search r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sun, 24 Jan 2021 00:32:52 +0000 (01:32 +0100)]
Support unions in symbol search
bors[bot] [Sat, 23 Jan 2021 16:30:26 +0000 (16:30 +0000)]
Merge #7411
7411: cargo update r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Sat, 23 Jan 2021 16:28:59 +0000 (11:28 -0500)]
cargo update
vsrs [Sat, 23 Jan 2021 13:56:20 +0000 (16:56 +0300)]
Add References code lens.
For Struct, Enum, Union and Trait symbols.
bors[bot] [Sat, 23 Jan 2021 08:42:45 +0000 (08:42 +0000)]
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>
Phil Ellison [Sat, 23 Jan 2021 07:54:45 +0000 (07:54 +0000)]
Remove use of SourceFileEdit
Phil Ellison [Fri, 1 Jan 2021 21:40:11 +0000 (21:40 +0000)]
Update tests to register the required standard library types
Phil Ellison [Fri, 1 Jan 2021 21:17:54 +0000 (21:17 +0000)]
Fix test names
Phil Ellison [Fri, 1 Jan 2021 21:11:08 +0000 (21:11 +0000)]
Identify methods using functions ids rather than string names
Phil Ellison [Wed, 30 Dec 2020 16:15:00 +0000 (16:15 +0000)]
cargo fmt
Phil Ellison [Wed, 30 Dec 2020 16:14:35 +0000 (16:14 +0000)]
Address review comments
Phil Ellison [Wed, 30 Dec 2020 15:52:36 +0000 (15:52 +0000)]
cargo fmt
Phil Ellison [Wed, 30 Dec 2020 15:46:05 +0000 (15:46 +0000)]
Implement fix, add tests
Phil Ellison [Mon, 28 Dec 2020 13:41:15 +0000 (13:41 +0000)]
Add diagnostic for filter_map followed by next
bors[bot] [Sat, 23 Jan 2021 04:04:09 +0000 (04:04 +0000)]
Merge #7391
7391: Fix error when using "extern crate self as" r=kazatsuyu a=kazatsuyu
Fix #6957
Co-authored-by: kazatsuyu <shirayama.kazatsuyu@gmail.com>
Dániel Buga [Fri, 22 Jan 2021 22:31:19 +0000 (23:31 +0100)]
Deduplicate variant matching
Dániel Buga [Fri, 22 Jan 2021 22:29:51 +0000 (23:29 +0100)]
replace_if_let_with_match: don't assume sad pattern
bors[bot] [Fri, 22 Jan 2021 17:11:48 +0000 (17:11 +0000)]
Merge #7399
7399: Make `ModuleId`'s `krate` field private and audit uses r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Fri, 22 Jan 2021 17:09:55 +0000 (18:09 +0100)]
Make `ModuleId`'s `krate` field private
bors[bot] [Fri, 22 Jan 2021 16:51:45 +0000 (16:51 +0000)]
Merge #7398
7398: stave off zombies r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 22 Jan 2021 16:50:56 +0000 (19:50 +0300)]
stave off zombies
bors[bot] [Fri, 22 Jan 2021 16:16:22 +0000 (16:16 +0000)]
Merge #7396
7396: More annoying asserts r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 22 Jan 2021 16:05:28 +0000 (19:05 +0300)]
Normalize tests
Aleksey Kladov [Fri, 22 Jan 2021 15:59:22 +0000 (18:59 +0300)]
More useful fn detail in completion
Detail should be rendered as shtort one line, just dumping fn header
there is not useful, despite the fact that TS does this.
The fact that this is a function should be indicated by the icon, the
same goes for pub/const/async etc qualitfiers
name is already present in the lable (and arg list should be a part of
that, as in idea)
But the return type is the small genuinerlly useful bit of info we can show here
Aleksey Kladov [Fri, 22 Jan 2021 15:58:50 +0000 (18:58 +0300)]
Make assertion failures more annoying for maintainers
bors[bot] [Fri, 22 Jan 2021 15:45:50 +0000 (15:45 +0000)]
Merge #7310 #7395
7310: Add assist: add lifetime to type r=matklad a=bnjjj
close #7200
7395: Obtain `ModuleId`'s `DefMap` through a method r=jonas-schievink a=jonas-schievink
Once `ModuleId` can represent modules inside block expressions, this will be required in order to obtain the correct `DefMap`. Otherwise existing code might use a `LocalModuleId` from the wrong `DefMap` and cause a panic.
bors r+
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Fri, 22 Jan 2021 15:31:40 +0000 (16:31 +0100)]
Obtain `ModuleId`'s `DefMap` through a method
bors[bot] [Fri, 22 Jan 2021 15:31:47 +0000 (15:31 +0000)]
Merge #7353
7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril
Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there.
`ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better?
Additions were solely inspired by (the single) test output for const params.
Also sorts the variants of `CompletionItemKind` and its to_proto match.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
kazatsuyu [Fri, 22 Jan 2021 15:11:37 +0000 (00:11 +0900)]
Add mark::check! and mark::hit!
bors[bot] [Fri, 22 Jan 2021 14:58:39 +0000 (14:58 +0000)]
Merge #7394
7394: Promote marks r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 22 Jan 2021 14:58:00 +0000 (17:58 +0300)]
Promote marks
Arnaud [Fri, 22 Jan 2021 14:24:32 +0000 (15:24 +0100)]
Document `paths` items
bors[bot] [Fri, 22 Jan 2021 13:58:26 +0000 (13:58 +0000)]
Merge #7374
7374: Add step to run analysis-stats on std r=lnicola a=tweksteen
Run `analysis-stats` on `std` as part of the release workflow. Uses the `--with-deps` to also parse other crates defined in `stdlibs`. Remove the condition for exection, both analysis will be run for nightly and release builds.
Do not submit until #6956 has been fixed.
Bug: #6956
Co-authored-by: Thiébaud Weksteen <tweek@google.com>
kazatsuyu [Fri, 22 Jan 2021 13:52:04 +0000 (22:52 +0900)]
cargo fmt
kazatsuyu [Fri, 22 Jan 2021 13:28:45 +0000 (22:28 +0900)]
Fix error when using "extern crate self as"
bors[bot] [Fri, 22 Jan 2021 13:14:40 +0000 (13:14 +0000)]
Merge #7386
7386: Handle box with allocator r=flodiebold a=tweksteen
In 1.49.0, the definition of Box was modified to support an optional
Allocator[1]. Adapt the parsing of the `box` keyword to supply the
expected number of parameters to the constructor.
[1] https://github.com/rust-lang/rust/commit/
f288cd2e179f600fa00c2a407206a12f6c5a91e0
Fixes: #6956
Co-authored-by: Thiébaud Weksteen <tweek@google.com>
Thiébaud Weksteen [Fri, 22 Jan 2021 10:17:45 +0000 (11:17 +0100)]
Handle box with allocator
In 1.49.0, the definition of Box was modified to support an optional
Allocator[1]. Adapt the parsing of the `box` keyword to supply the
expected number of parameters to the constructor.
[1] https://github.com/rust-lang/rust/commit/
f288cd2e179f600fa00c2a407206a12f6c5a91e0
bors[bot] [Fri, 22 Jan 2021 12:42:55 +0000 (12:42 +0000)]
Merge #7390
7390: Style: use the right string r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Fri, 22 Jan 2021 12:29:42 +0000 (12:29 +0000)]
Merge #7348
7348: Fix broken link in intra-doc r=edwin0cheng a=sasurau4
Fix #5546
The intra-doc link doesn't work fine for trait associated method.
Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
Aleksey Kladov [Fri, 22 Jan 2021 12:26:19 +0000 (15:26 +0300)]
Style: use the right string
bors[bot] [Fri, 22 Jan 2021 12:14:23 +0000 (12:14 +0000)]
Merge #7389
7389: Remove approximate goto def r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 22 Jan 2021 12:13:18 +0000 (15:13 +0300)]
Cleanup tests
Aleksey Kladov [Fri, 22 Jan 2021 12:11:29 +0000 (15:11 +0300)]
Remove index based fallback for goto def
We are so precise that the fallback creates more confusion, when you can
goto def on an unresolved reference.
bors[bot] [Fri, 22 Jan 2021 11:52:23 +0000 (11:52 +0000)]
Merge #7388
7388: Minor fix for #7387 r=edwin0cheng a=edwin0cheng
bors r+
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Fri, 22 Jan 2021 11:51:14 +0000 (19:51 +0800)]
Use AbsPath
bors[bot] [Fri, 22 Jan 2021 11:15:22 +0000 (11:15 +0000)]
Merge #7387
7387: Refactor build script specific data r=edwin0cheng a=edwin0cheng
It refactors for separating logic for build script specific data.
bors r+
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Fri, 22 Jan 2021 11:11:01 +0000 (19:11 +0800)]
Refactor build script data
Daiki Ihara [Tue, 19 Jan 2021 15:43:06 +0000 (00:43 +0900)]
Fix broken link in intra-doc
bors[bot] [Thu, 21 Jan 2021 20:12:58 +0000 (20:12 +0000)]
Merge #7384
7384: Remove unused field r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 21 Jan 2021 20:12:26 +0000 (21:12 +0100)]
Remove unused field
bors[bot] [Thu, 21 Jan 2021 19:36:08 +0000 (19:36 +0000)]
Merge #7383
7383: Add test for path resolution bug r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 21 Jan 2021 19:35:36 +0000 (20:35 +0100)]
Add test for path resolution bug
bors[bot] [Thu, 21 Jan 2021 19:06:43 +0000 (19:06 +0000)]
Merge #7382
7382: Cargo update r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Thu, 21 Jan 2021 19:00:42 +0000 (14:00 -0500)]
Cargo update
bors[bot] [Thu, 21 Jan 2021 18:04:58 +0000 (18:04 +0000)]
Merge #7381
7381: Revert "Make use of `block_def_map` in body lowering" r=jonas-schievink a=jonas-schievink
Reverts rust-analyzer/rust-analyzer#7380, since it broke stuff
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 21 Jan 2021 18:04:31 +0000 (19:04 +0100)]
Revert "Make use of `block_def_map` in body lowering"
bors[bot] [Thu, 21 Jan 2021 17:46:44 +0000 (17:46 +0000)]
Merge #7378
7378: Include `countme` crate to count important data structures. r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Thu, 21 Jan 2021 17:09:05 +0000 (17:09 +0000)]
Merge #7380
7380: Make use of `block_def_map` in body lowering r=jonas-schievink a=jonas-schievink
Removes the `local_scope` argument from `Expander` in favor of tracking the `DefMap` in use during body lowering.
For now, we still collect inner items as usual, because other code still relies on `item_scope`.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 21 Jan 2021 17:05:52 +0000 (18:05 +0100)]
Make use of `block_def_map` in body lowering
Removes the `local_scope` hack from `Expander` in favor of tracking the
`DefMap` in use during body lowering
Aleksey Kladov [Thu, 21 Jan 2021 16:04:50 +0000 (19:04 +0300)]
Include `countme` crate to count important data structures.
bors[bot] [Thu, 21 Jan 2021 16:20:17 +0000 (16:20 +0000)]
Merge #7377
7377: Remove unnecessary annotations from tests r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Thu, 21 Jan 2021 16:19:46 +0000 (17:19 +0100)]
Remove unnecessary annotations from tests
bors[bot] [Thu, 21 Jan 2021 15:43:53 +0000 (15:43 +0000)]
Merge #7376
7376: Add test for nameres in nested blocks r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>