]>
git.lizzy.rs Git - rust.git/log
Aleksey Kladov [Sat, 16 Jan 2021 19:38:22 +0000 (22:38 +0300)]
When building an item-tree, keep fewer nodes in memory
Aleksey Kladov [Sat, 16 Jan 2021 18:36:01 +0000 (21:36 +0300)]
Simpler and faster rowan
This removes thread-local syntax node caching, which improves perf a
bunch
bors[bot] [Sat, 16 Jan 2021 17:52:29 +0000 (17:52 +0000)]
Merge #7295
7295: Share import_assets and related entities r=matklad a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/pull/7293
Addresses https://github.com/rust-analyzer/rust-analyzer/pull/7293#issuecomment-
761569558
Prepares `import_assets` and related to be used later for the trait fuzzy importing.
Also moves fuzzy imports into a separate completion module and renames them, as suggested in https://github.com/rust-analyzer/rust-analyzer/pull/7293#discussion_r558896685
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Kirill Bulatov [Sat, 16 Jan 2021 17:51:42 +0000 (19:51 +0200)]
Unindent the test
Kirill Bulatov [Sat, 16 Jan 2021 17:40:59 +0000 (19:40 +0200)]
Use specific kind for the flyimport completions
Kirill Bulatov [Sat, 16 Jan 2021 17:33:36 +0000 (19:33 +0200)]
Share import_assets and related entities
bors[bot] [Fri, 15 Jan 2021 21:06:19 +0000 (21:06 +0000)]
Merge #7290
7290: Add test mark for skipping single use item in Unmerge use assist r=Veykril a=unexge
followup for https://github.com/rust-analyzer/rust-analyzer/pull/7289
Co-authored-by: unexge <unexge@gmail.com>
unexge [Fri, 15 Jan 2021 19:57:10 +0000 (22:57 +0300)]
Add test mark for skipping single use item
bors[bot] [Fri, 15 Jan 2021 19:43:59 +0000 (19:43 +0000)]
Merge #7289
7289: Add Unmerge Use assist r=matklad a=unexge
Closes https://github.com/rust-analyzer/rust-analyzer/issues/7185
Co-authored-by: unexge <unexge@gmail.com>
unexge [Fri, 15 Jan 2021 19:35:42 +0000 (22:35 +0300)]
Create new nodes only when applying changes
unexge [Fri, 15 Jan 2021 19:14:51 +0000 (22:14 +0300)]
Add Unmerge Use assist
bors[bot] [Fri, 15 Jan 2021 18:40:47 +0000 (18:40 +0000)]
Merge #7288
7288: Handle self/super/crate in PathSegment as NameRef r=matklad a=Veykril
Wrapping self/super/crate in NameRef as per https://github.com/rust-analyzer/rust-analyzer/pull/7261#issuecomment-
760023172
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 15 Jan 2021 17:57:32 +0000 (18:57 +0100)]
Handle self/super/crate in PathSegment as NameRef
bors[bot] [Fri, 15 Jan 2021 17:46:36 +0000 (17:46 +0000)]
Merge #7287
7287: Make SyntaxPtr lookup logarithmic r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 15 Jan 2021 17:40:40 +0000 (20:40 +0300)]
Make SyntaxPtr lookup logarithmic
closes #3934
cc https://github.com/rust-analyzer/rowan/pull/81
bors[bot] [Fri, 15 Jan 2021 17:34:31 +0000 (17:34 +0000)]
Merge #7285
7285: Don't duplicate rustc diagnostics fixes r=matklad a=jonas-schievink
Should fix https://github.com/rust-analyzer/rust-analyzer/issues/6851
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
bors[bot] [Fri, 15 Jan 2021 17:16:27 +0000 (17:16 +0000)]
Merge #7286
7286: Remove useless wrapper r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 15 Jan 2021 17:15:33 +0000 (20:15 +0300)]
Remove useless wrapper
Jonas Schievink [Fri, 15 Jan 2021 17:11:54 +0000 (18:11 +0100)]
Don't duplicate rustc diagnostics fixes
bors[bot] [Fri, 15 Jan 2021 14:48:21 +0000 (14:48 +0000)]
Merge #7209
7209: Support yield keyword r=Veykril a=sasurau4
Part of #4309
The inference of yield will be implemented at another PR.
Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
Daiki Ihara [Wed, 13 Jan 2021 15:02:03 +0000 (00:02 +0900)]
Add test for yield_expr
Daiki Ihara [Wed, 13 Jan 2021 15:01:50 +0000 (00:01 +0900)]
Add support for yiled keyword
Daiki Ihara [Wed, 13 Jan 2021 15:01:32 +0000 (00:01 +0900)]
Upgrade ungrammar to v1.7
bors[bot] [Fri, 15 Jan 2021 12:51:20 +0000 (12:51 +0000)]
Merge #7281
7281: Insert `;` when completing keywords in let r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 15 Jan 2021 12:49:59 +0000 (15:49 +0300)]
Insert `;` when completing keywords in let
Aleksey Kladov [Fri, 15 Jan 2021 12:13:30 +0000 (15:13 +0300)]
Simplify
Aleksey Kladov [Fri, 15 Jan 2021 12:01:32 +0000 (15:01 +0300)]
Add braces when completing ifs
bors[bot] [Fri, 15 Jan 2021 09:43:08 +0000 (09:43 +0000)]
Merge #7272
7272: Group file source edits by FileId r=matklad a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Fri, 15 Jan 2021 08:36:26 +0000 (08:36 +0000)]
Merge #7278
7278: bump arena r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 15 Jan 2021 08:35:55 +0000 (11:35 +0300)]
bump arena
Aleksey Kladov [Fri, 15 Jan 2021 08:31:29 +0000 (11:31 +0300)]
bump arena
bors[bot] [Fri, 15 Jan 2021 08:18:22 +0000 (08:18 +0000)]
Merge #7274
7274: Flesh out la-arena crate r=lnicola a=arzg
As requested in #7267, I’ve added some basic documentation and added more keys to the crate’s `Cargo.toml`.
Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
Aramis Razzaghipour [Thu, 14 Jan 2021 23:53:35 +0000 (10:53 +1100)]
Add more keys to la-arena Cargo.toml
Aramis Razzaghipour [Thu, 14 Jan 2021 23:37:09 +0000 (10:37 +1100)]
Add docs to la-arena crate
Lukas Wirth [Thu, 14 Jan 2021 21:43:36 +0000 (22:43 +0100)]
Phase out SourceFileEdits in favour of a plain HashMap
Lukas Wirth [Thu, 14 Jan 2021 21:43:09 +0000 (22:43 +0100)]
Fix assert_never invoking assert_always
Lukas Wirth [Thu, 14 Jan 2021 17:35:22 +0000 (18:35 +0100)]
Group file source edits by FileId
bors[bot] [Thu, 14 Jan 2021 16:06:30 +0000 (16:06 +0000)]
Merge #7271
7271: prepare to publish el libro de arena r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Jan 2021 15:47:42 +0000 (18:47 +0300)]
prepare to publish el libro de arena
bors[bot] [Thu, 14 Jan 2021 15:27:20 +0000 (15:27 +0000)]
Merge #7270
7270: Introduce more appropriate assertion mechanism r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Jan 2021 15:25:19 +0000 (18:25 +0300)]
Introduce more appropriate assertion mechanism
rust-analyzer is a long-running program, so we *should* handle assertion
failures.
See also https://www.sqlite.org/assert.html.
bors[bot] [Thu, 14 Jan 2021 13:40:06 +0000 (13:40 +0000)]
Merge #7269
7269: Fix server path comparison r=lnicola a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 14 Jan 2021 13:38:57 +0000 (15:38 +0200)]
Fix server path comparison
bors[bot] [Thu, 14 Jan 2021 11:56:01 +0000 (11:56 +0000)]
Merge #7266
7266: Make printin the backtrace more convenient r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Jan 2021 11:55:13 +0000 (14:55 +0300)]
Make printin the backtrace more convenient
bors[bot] [Thu, 14 Jan 2021 11:41:29 +0000 (11:41 +0000)]
Merge #7265
7265: Add a test for #7110 r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Jan 2021 11:33:02 +0000 (14:33 +0300)]
Add a test for #7110
bors[bot] [Thu, 14 Jan 2021 11:31:10 +0000 (11:31 +0000)]
Merge #7264
7264: Use --workspace when loading extern resources r=edwin0cheng a=chinedufn
https://github.com/rust-analyzer/rust-analyzer/issues/5040#issuecomment-
759853153
Co-authored-by: Chinedu Francis Nwafili <frankie.nwafili@gmail.com>
Chinedu Francis Nwafili [Thu, 14 Jan 2021 11:03:41 +0000 (06:03 -0500)]
Use --workspace when loading extern resources
https://github.com/rust-analyzer/rust-analyzer/issues/5040#issuecomment-
759853153
bors[bot] [Thu, 14 Jan 2021 10:52:12 +0000 (10:52 +0000)]
Merge #7211
7211: Fixed expr meta var after path colons in mbe r=matklad a=edwin0cheng
Fixes #7207
Added `L_DOLLAR` in `ITEM_RECOVERY_SET` , but I don't know whether it is a good idea.
r? @matklad
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
bors[bot] [Thu, 14 Jan 2021 10:13:57 +0000 (10:13 +0000)]
Merge #7257
7257: vfs documentation r=matklad a=arnaudgolfouse
This documents every item in the `vfs` crate, except for a few private, windows-specific items.
Co-authored-by: Arnaud <arnaud.golfouse@free.fr>
bors[bot] [Thu, 14 Jan 2021 10:00:46 +0000 (10:00 +0000)]
Merge #7110
7110: Deduplicate macros when offering completion r=matklad a=AdnoC
Closes https://github.com/rust-analyzer/rust-analyzer/issues/7081
When iterating over the names within the `hir_def::resolver::Scope` for a module, track what macros are in the `hir_def::item_scope::ItemScope::legacy_macros` collection for the module. When iterating over names from the prelude, do not proccess the name if it had been in the `legacy_macros` collection.
This is implemented with a `FxHashSet` in the `Scope::process_names` function that is populated when iterating over `legacy_macros` and checked when iterating over the prelude.
Alternative implementation could instead query the `legacy_macros` `FxHashMap` directly when processing names in the prelude.
Also, I'd like to add a test for this, but I'm not sure where it could be added.
Co-authored-by: AdnoC <adam.r.cutler@gmail.com>
bors[bot] [Thu, 14 Jan 2021 09:07:15 +0000 (09:07 +0000)]
Merge #7260
7260: Render Fn* trait objects and impl types as rust does r=matklad a=Veykril
Also fixes raw ptr impl types being rendered ambiguously with multiple predicates.
This moves out the `FamousDefs::Fixture` into its own file as well, cause I figured it is big enough to get its own file at this point + we also get highlighting this way when editing it.
Fixes #3012
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Wed, 13 Jan 2021 23:22:34 +0000 (23:22 +0000)]
Merge #6809
6809: Add quick fix to sort impl methods by trait definition r=fisherdarling a=fisherdarling
Closes #6110
Co-authored-by: Fisher Darling <fdarlingco@gmail.com>
Fisher Darling [Thu, 10 Dec 2020 19:42:04 +0000 (12:42 -0700)]
Sort impls by trait definition
Closes #6110
bors[bot] [Wed, 13 Jan 2021 18:35:08 +0000 (18:35 +0000)]
Merge #7263
7263: Use upstream TextSize API r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 13 Jan 2021 17:10:46 +0000 (20:10 +0300)]
Use upstream TextSize API
bors[bot] [Wed, 13 Jan 2021 17:40:45 +0000 (17:40 +0000)]
Merge #7220
7220: same level folder rename for will_rename_files r=kjeremy a=ShuiRuTian
use tricky way to support folder rename.
Another step after #7009 and for #4471
Co-authored-by: ShuiRuTian <158983297@qq.com>
Co-authored-by: Song Gao <158983297@qq.com>
ShuiRuTian [Wed, 13 Jan 2021 14:56:31 +0000 (22:56 +0800)]
fix windows test.
Lukas Wirth [Tue, 12 Jan 2021 19:19:13 +0000 (20:19 +0100)]
Render Fn* trait objects and impl types as rust does
bors[bot] [Wed, 13 Jan 2021 12:09:26 +0000 (12:09 +0000)]
Merge #7262
7262: Don't show internal server error on rename r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 13 Jan 2021 11:09:51 +0000 (14:09 +0300)]
Don't show internal server error on rename
Doesn't quite work due to https://github.com/microsoft/vscode-languageserver-node/issues/730
Note that this intentionally removes `impl std::Error for RenameError`
-- we nether want to blindly bubble the rename error.
bors[bot] [Wed, 13 Jan 2021 10:38:30 +0000 (10:38 +0000)]
Merge #7251
7251: Group references by FileId r=matklad a=Veykril
Fixes #4901
This doesn't address https://github.com/rust-analyzer/rust-analyzer/pull/7032/files#diff-a7e1e771e911237bb893e1b0f5e0f2c2a856b54ca06f95ef0818a922f1a8b5ebR266
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
ShuiRuTian [Wed, 13 Jan 2021 04:10:45 +0000 (12:10 +0800)]
unwrap.
Arnaud [Tue, 12 Jan 2021 16:41:45 +0000 (17:41 +0100)]
Document vfs private items
Arnaud [Tue, 12 Jan 2021 16:22:57 +0000 (17:22 +0100)]
Document vfs public items
ShuiRuTian [Tue, 12 Jan 2021 16:58:28 +0000 (00:58 +0800)]
skip slow tests.
ShuiRuTian [Tue, 12 Jan 2021 16:53:17 +0000 (00:53 +0800)]
use path rather than hard code.
ShuiRuTian [Tue, 12 Jan 2021 16:30:49 +0000 (00:30 +0800)]
fix and add tests.
Lukas Wirth [Tue, 12 Jan 2021 16:26:08 +0000 (17:26 +0100)]
Move FamousDefs fixture out into its own file
Lukas Wirth [Tue, 12 Jan 2021 14:56:24 +0000 (15:56 +0100)]
Rename FileReferences -> UsageSearchResult
Lukas Wirth [Tue, 12 Jan 2021 14:51:02 +0000 (15:51 +0100)]
Ensure uniqueness of file ids in reference search via hashmap
Lukas Wirth [Mon, 11 Jan 2021 23:05:07 +0000 (00:05 +0100)]
Group references by FileId
bors[bot] [Mon, 11 Jan 2021 19:18:34 +0000 (19:18 +0000)]
Merge #7250
7250: Improve analysis stats legibility r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 11 Jan 2021 19:17:30 +0000 (22:17 +0300)]
Improve analysis stats legibility
bors[bot] [Mon, 11 Jan 2021 18:40:23 +0000 (18:40 +0000)]
Merge #7249
7249: Add build benchmark xtask command r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 11 Jan 2021 18:39:16 +0000 (21:39 +0300)]
Add build benchmark xtask command
ShuiRuTian [Mon, 11 Jan 2021 16:21:43 +0000 (00:21 +0800)]
format
ShuiRuTian [Mon, 11 Jan 2021 16:21:03 +0000 (00:21 +0800)]
fix as suggestion.
Song Gao [Mon, 11 Jan 2021 16:16:12 +0000 (00:16 +0800)]
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Song Gao [Mon, 11 Jan 2021 16:15:56 +0000 (00:15 +0800)]
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
bors[bot] [Mon, 11 Jan 2021 14:08:00 +0000 (14:08 +0000)]
Merge #7247
7247: cargo update r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 11 Jan 2021 14:06:30 +0000 (09:06 -0500)]
cargo update
bors[bot] [Mon, 11 Jan 2021 13:37:28 +0000 (13:37 +0000)]
Merge #7051 #7219 #7245 #7246
7051: Check dbg! macro in tidy_test r=matklad a=edwin0cheng
Same as `check_todo` but for dbg! macro
r? @matklad
7219: Refactor rename name checking r=matklad a=Veykril
Improves the user facing error messages a bit and prevents renaming to `_` when the name is referenced as this would change source to not compile anymore since `_` is only a pattern, not a proper identifier.
7245: Encourage gifs r=matklad a=matklad
bors r+
🤖
7246: Unfreeze cargo_metadata r=matklad a=kjeremy
It now pulls in a newer version of semver-parser.
This does add a dependency on `cargo-platform` in the interest of correctness.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
Aleksey Kladov [Mon, 11 Jan 2021 13:29:29 +0000 (16:29 +0300)]
Encourage gifs
kjeremy [Mon, 11 Jan 2021 13:27:16 +0000 (08:27 -0500)]
Unfreeze cargo_metadata
It now pulls in a newer version of semver-parser.
bors[bot] [Mon, 11 Jan 2021 13:25:51 +0000 (13:25 +0000)]
Merge #7244
7244: Goto for inner doc links works for module inner doc comments r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 11 Jan 2021 13:24:50 +0000 (16:24 +0300)]
Goto for inner doc links works for module inner doc comments
bors[bot] [Mon, 11 Jan 2021 11:27:54 +0000 (11:27 +0000)]
Merge #7235
7235: Postfix completions like ifl now works with references r=Veykril a=Maan2003
Closes #7230
Co-authored-by: Manmeet <manmeetmann2003@gmail.com>
Co-authored-by: Manmeet Maan <manmeetmann2003@gmail.com>
ShuiRuTian [Mon, 11 Jan 2021 06:45:35 +0000 (14:45 +0800)]
move logic from client to server.
Manmeet Maan [Mon, 11 Jan 2021 06:17:38 +0000 (11:47 +0530)]
Fix formatting
Manmeet Maan [Mon, 11 Jan 2021 06:02:55 +0000 (11:32 +0530)]
Apply Suggestions from code review
Lukas Wirth [Sun, 10 Jan 2021 21:27:43 +0000 (22:27 +0100)]
Add some more marks to rename tests
Lukas Wirth [Sun, 10 Jan 2021 20:59:44 +0000 (21:59 +0100)]
Use local error macros in references/rename
bors[bot] [Sun, 10 Jan 2021 19:41:06 +0000 (19:41 +0000)]
Merge #7241
7241: Honor client's dynamic registration caps r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 10 Jan 2021 19:38:35 +0000 (22:38 +0300)]
Honor client's dynamic registration caps
cc https://github.com/rust-analyzer/rust-analyzer/pull/5516#issuecomment-
757520828
bors[bot] [Sun, 10 Jan 2021 18:16:29 +0000 (18:16 +0000)]
Merge #7218
7218: Fix typos r=Veykril a=regexident
Apart from the very last commit on this PR (which fixes a public type's name) all changes are non-breaking.
Co-authored-by: Vincent Esche <regexident@gmail.com>
bors[bot] [Sun, 10 Jan 2021 17:59:06 +0000 (17:59 +0000)]
Merge #7240
7240: Make default memory stats less verbose r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 10 Jan 2021 17:58:02 +0000 (20:58 +0300)]
Make default memory stats less verbose
Vincent Esche [Sun, 10 Jan 2021 16:12:02 +0000 (17:12 +0100)]
Updated tests via `cargo xtask codegen`