]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #7326
bors[bot] [Mon, 18 Jan 2021 17:40:11 +0000 (17:40 +0000)]
Merge #7326

7326: Use `is_ident` when converting Path to an Identifier r=edwin0cheng a=kevaundray

Co-authored-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
3 years agoMerge #7329
bors[bot] [Mon, 18 Jan 2021 17:24:48 +0000 (17:24 +0000)]
Merge #7329

7329: Add test for reference search on self declaration param r=Veykril a=Veykril

Closes #7316

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd test for reference search on self declaration param
Lukas Wirth [Mon, 18 Jan 2021 17:21:40 +0000 (18:21 +0100)]
Add test for reference search on self declaration param

3 years agoMerge #7327
bors[bot] [Mon, 18 Jan 2021 17:11:38 +0000 (17:11 +0000)]
Merge #7327

7327: Remove `item_tree::Expr` r=jonas-schievink a=jonas-schievink

It's empty and unused

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove `item_tree::Expr`
Jonas Schievink [Mon, 18 Jan 2021 17:05:40 +0000 (18:05 +0100)]
Remove `item_tree::Expr`

It's empty and unused

3 years agocargo fmt
Kevaundray Wedderburn [Mon, 18 Jan 2021 16:58:29 +0000 (16:58 +0000)]
cargo fmt

3 years agoMerge #7324
bors[bot] [Mon, 18 Jan 2021 16:57:17 +0000 (16:57 +0000)]
Merge #7324

7324: Add `MacroType` r=jonas-schievink a=jonas-schievink

Adds syntax-level support for macros in type position.

Based on https://github.com/rust-analyzer/rust-analyzer/pull/7291 due to the ungrammar update

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd `MacroType` syntax
Jonas Schievink [Mon, 18 Jan 2021 15:58:43 +0000 (16:58 +0100)]
Add `MacroType` syntax

3 years agouse `is_ident` method
Kevaundray Wedderburn [Mon, 18 Jan 2021 16:54:07 +0000 (16:54 +0000)]
use `is_ident` method

3 years agoMerge #7291
bors[bot] [Mon, 18 Jan 2021 16:13:06 +0000 (16:13 +0000)]
Merge #7291

7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril

That should be the remaining special casing for `self` ðŸŽ‰

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #7323
bors[bot] [Mon, 18 Jan 2021 13:11:37 +0000 (13:11 +0000)]
Merge #7323

7323: Minor r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMinor
Aleksey Kladov [Mon, 18 Jan 2021 13:09:09 +0000 (16:09 +0300)]
Minor

3 years agoMerge #7322
bors[bot] [Mon, 18 Jan 2021 12:58:54 +0000 (12:58 +0000)]
Merge #7322

7322: Use assert_never properly r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse assert_never properly
Aleksey Kladov [Mon, 18 Jan 2021 12:58:10 +0000 (15:58 +0300)]
Use assert_never properly

3 years agoMerge #7320
bors[bot] [Mon, 18 Jan 2021 12:05:39 +0000 (12:05 +0000)]
Merge #7320

7320: Enable serde_json unbounded_depth feature r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoEnable serde_json unbounded_depth feature
Laurențiu Nicola [Mon, 18 Jan 2021 12:04:20 +0000 (14:04 +0200)]
Enable serde_json unbounded_depth feature

3 years agoMerge #7319
bors[bot] [Mon, 18 Jan 2021 11:56:20 +0000 (11:56 +0000)]
Merge #7319

7319: Avoid blocking the main loop when editing Cargo.toml r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAvoid blocking the main loop when editing Cargo.toml
Aleksey Kladov [Mon, 18 Jan 2021 11:52:12 +0000 (14:52 +0300)]
Avoid blocking the main loop when editing Cargo.toml

I've noticed a bunch of "main loop too long" warnings in console when
typing in Cargo.toml. Profiling showed that the culprit is `rustc
--print cfg` call.

I moved it to the background project loading phase, where it belongs.
This highlighted a problem: we generally use single `cfg`, while it
really should be per crate.

3 years agoMerge #7318
bors[bot] [Mon, 18 Jan 2021 11:02:19 +0000 (11:02 +0000)]
Merge #7318

7318: Add profile call r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd profile call
Aleksey Kladov [Mon, 18 Jan 2021 11:01:52 +0000 (14:01 +0300)]
Add profile call

3 years agoMerge #7317
bors[bot] [Mon, 18 Jan 2021 10:30:43 +0000 (10:30 +0000)]
Merge #7317

7317: Add profile call r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd profile call
Aleksey Kladov [Mon, 18 Jan 2021 10:25:57 +0000 (13:25 +0300)]
Add profile call

3 years agoMerge #7292
bors[bot] [Mon, 18 Jan 2021 10:12:54 +0000 (10:12 +0000)]
Merge #7292

7292: Swap assert_eq_text\!(expected, actual) r=matklad a=u5surf

Fixes #7283

Swap assert_eq_text parameters in the order (expected, actual)

Co-authored-by: yugo-horie <u5.horie@gmail.com>
3 years agoMerge #7314
bors[bot] [Sun, 17 Jan 2021 17:57:03 +0000 (17:57 +0000)]
Merge #7314

7314: :arrow_up: rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years ago:arrow_up: rowan
Aleksey Kladov [Sun, 17 Jan 2021 17:56:37 +0000 (20:56 +0300)]
:arrow_up: rowan

3 years agoMerge #7312
bors[bot] [Sun, 17 Jan 2021 15:28:29 +0000 (15:28 +0000)]
Merge #7312

7312: :arrow_up: rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years ago:arrow_up: rowan
Aleksey Kladov [Sun, 17 Jan 2021 15:27:29 +0000 (18:27 +0300)]
:arrow_up: rowan

https://github.com/rust-analyzer/rowan/pull/86, which speeds up things
visibly

3 years agoMerge #7311
bors[bot] [Sun, 17 Jan 2021 14:50:08 +0000 (14:50 +0000)]
Merge #7311

7311: Build dist-aarch64-unknown-linux-gnu releases r=lnicola a=lnicola

Closes #4746

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoDownload aarch64-unknown-linux-gnu from GitHub
Laurențiu Nicola [Sun, 17 Jan 2021 14:35:57 +0000 (16:35 +0200)]
Download aarch64-unknown-linux-gnu from GitHub

3 years agoBuild dist-aarch64-unknown-linux-gnu releases
Laurențiu Nicola [Sun, 17 Jan 2021 14:23:38 +0000 (16:23 +0200)]
Build dist-aarch64-unknown-linux-gnu releases

3 years agoMerge #7309
bors[bot] [Sun, 17 Jan 2021 13:50:43 +0000 (13:50 +0000)]
Merge #7309

7309: Add missing inlines r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd missing inlines
Aleksey Kladov [Sun, 17 Jan 2021 13:50:03 +0000 (16:50 +0300)]
Add missing inlines

3 years agoMerge #7306
bors[bot] [Sun, 17 Jan 2021 10:20:25 +0000 (10:20 +0000)]
Merge #7306

7306: Less annoying `mod` completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoLess annoying `mod` completion
Aleksey Kladov [Sun, 17 Jan 2021 10:18:45 +0000 (13:18 +0300)]
Less annoying `mod` completion

We shouldn't complete optional elements, as deleting stuff is much more
annoying than adding it.

3 years agoMerge #7305
bors[bot] [Sun, 17 Jan 2021 08:43:34 +0000 (08:43 +0000)]
Merge #7305

7305: :arrow_up: arena r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years ago:arrow_up: arena
Aleksey Kladov [Sun, 17 Jan 2021 08:41:45 +0000 (11:41 +0300)]
:arrow_up: arena

3 years agoMerge #7275
bors[bot] [Sun, 17 Jan 2021 08:01:20 +0000 (08:01 +0000)]
Merge #7275

7275: Make arena index vs ID naming consistent r=matklad a=arzg

This makes naming consistent with `la_arena::RawId`. Alternatively, la-arena’s documentation could be updated to use â€˜index’ terminology instead of â€˜ID’ terminology, and `RawId` renamed to `RawIdx`.

This pull request doesn’t compile because dependencies on la-arena go through crates.io, so existing dependencies on the crate are referencing an old version. As such, this PR will only compile once a new la-arena version has been published.

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
3 years agoUse ‘index’ terminology for arena consistently
Aramis Razzaghipour [Fri, 15 Jan 2021 00:02:08 +0000 (11:02 +1100)]
Use â€˜index’ terminology for arena consistently

3 years agoMerge #7276
bors[bot] [Sun, 17 Jan 2021 07:20:36 +0000 (07:20 +0000)]
Merge #7276

7276: Remove map module from la-arena public API r=lnicola a=arzg

It’s unlikely that more items will be added to the module, so it’s simpler for users if `ArenaMap` is re-exported and the module made private.

This doesn’t compile for the same reason that #7275 doesn’t:

> This pull request doesn’t compile because dependencies on la-arena go through crates.io, so existing dependencies on the crate are referencing an old version. As such, this PR will only compile once a new la-arena version has been published.

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
3 years agoMerge #7304
bors[bot] [Sun, 17 Jan 2021 07:05:44 +0000 (07:05 +0000)]
Merge #7304

7304: Depend on local copy of la-arena instead of crates.io’s r=lnicola a=arzg

This addresses [this comment](https://github.com/rust-analyzer/rust-analyzer/pull/7276#issuecomment-760909936). #7275 and #7276 should start compiling if this is merged.

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
3 years agoDepend on local copy of la-arena instead of crates.io’s
Aramis Razzaghipour [Sun, 17 Jan 2021 06:52:57 +0000 (17:52 +1100)]
Depend on local copy of la-arena instead of crates.io’s

3 years agoMerge #7300
bors[bot] [Sat, 16 Jan 2021 20:08:10 +0000 (20:08 +0000)]
Merge #7300

7300: When building an item-tree, keep fewer nodes in memory r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoWhen building an item-tree, keep fewer nodes in memory
Aleksey Kladov [Sat, 16 Jan 2021 19:38:22 +0000 (22:38 +0300)]
When building an item-tree, keep fewer nodes in memory

3 years agoMerge #7296
bors[bot] [Sat, 16 Jan 2021 18:37:56 +0000 (18:37 +0000)]
Merge #7296

7296: Simpler and faster rowan r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoSimpler and faster rowan
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

3 years agoMerge #7295
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>
3 years agoUnindent the test
Kirill Bulatov [Sat, 16 Jan 2021 17:51:42 +0000 (19:51 +0200)]
Unindent the test

3 years agoUse specific kind for the flyimport completions
Kirill Bulatov [Sat, 16 Jan 2021 17:40:59 +0000 (19:40 +0200)]
Use specific kind for the flyimport completions

3 years agoShare import_assets and related entities
Kirill Bulatov [Sat, 16 Jan 2021 17:33:36 +0000 (19:33 +0200)]
Share import_assets and related entities

3 years agoSwap assert_eq_text\!(expected, actual)
yugo-horie [Sat, 16 Jan 2021 04:30:26 +0000 (13:30 +0900)]
Swap assert_eq_text\!(expected, actual)

3 years agoWrap remaining self/super/crate in Name{Ref}
Lukas Wirth [Fri, 15 Jan 2021 20:07:38 +0000 (21:07 +0100)]
Wrap remaining self/super/crate in Name{Ref}

3 years agoMerge #7290
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>
3 years agoAdd test mark for skipping single use item
unexge [Fri, 15 Jan 2021 19:57:10 +0000 (22:57 +0300)]
Add test mark for skipping single use item

3 years agoMerge #7289
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>
3 years agoCreate new nodes only when applying changes
unexge [Fri, 15 Jan 2021 19:35:42 +0000 (22:35 +0300)]
Create new nodes only when applying changes

3 years agoAdd Unmerge Use assist
unexge [Fri, 15 Jan 2021 19:14:51 +0000 (22:14 +0300)]
Add Unmerge Use assist

3 years agoMerge #7288
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>
3 years agoHandle self/super/crate in PathSegment as NameRef
Lukas Wirth [Fri, 15 Jan 2021 17:57:32 +0000 (18:57 +0100)]
Handle self/super/crate in PathSegment as NameRef

3 years agoMerge #7287
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>
3 years agoMake SyntaxPtr lookup logarithmic
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

3 years agoMerge #7285
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>
3 years agoMerge #7286
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>
3 years agoRemove useless wrapper
Aleksey Kladov [Fri, 15 Jan 2021 17:15:33 +0000 (20:15 +0300)]
Remove useless wrapper

3 years agoDon't duplicate rustc diagnostics fixes
Jonas Schievink [Fri, 15 Jan 2021 17:11:54 +0000 (18:11 +0100)]
Don't duplicate rustc diagnostics fixes

3 years agoMerge #7209
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>
3 years agoAdd test for yield_expr
Daiki Ihara [Wed, 13 Jan 2021 15:02:03 +0000 (00:02 +0900)]
Add test for yield_expr

3 years agoAdd support for yiled keyword
Daiki Ihara [Wed, 13 Jan 2021 15:01:50 +0000 (00:01 +0900)]
Add support for yiled keyword

3 years agoUpgrade ungrammar to v1.7
Daiki Ihara [Wed, 13 Jan 2021 15:01:32 +0000 (00:01 +0900)]
Upgrade ungrammar to v1.7

3 years agoMerge #7281
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>
3 years agoInsert `;` when completing keywords in let
Aleksey Kladov [Fri, 15 Jan 2021 12:49:59 +0000 (15:49 +0300)]
Insert `;` when completing keywords in let

3 years agoSimplify
Aleksey Kladov [Fri, 15 Jan 2021 12:13:30 +0000 (15:13 +0300)]
Simplify

3 years agoAdd braces when completing ifs
Aleksey Kladov [Fri, 15 Jan 2021 12:01:32 +0000 (15:01 +0300)]
Add braces when completing ifs

3 years agoMerge #7272
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>
3 years agoMerge #7278
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>
3 years agobump arena
Aleksey Kladov [Fri, 15 Jan 2021 08:35:55 +0000 (11:35 +0300)]
bump arena

3 years agobump arena
Aleksey Kladov [Fri, 15 Jan 2021 08:31:29 +0000 (11:31 +0300)]
bump arena

3 years agoMerge #7274
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>
3 years agoRemove map module from la-arena public API
Aramis Razzaghipour [Fri, 15 Jan 2021 00:11:07 +0000 (11:11 +1100)]
Remove map module from la-arena public API

It’s unlikely that more items will be added to the module,
so it’s simpler for users if `ArenaMap` is re-exported
and the module made private.

3 years agoAdd more keys to la-arena Cargo.toml
Aramis Razzaghipour [Thu, 14 Jan 2021 23:53:35 +0000 (10:53 +1100)]
Add more keys to la-arena Cargo.toml

3 years agoAdd docs to la-arena crate
Aramis Razzaghipour [Thu, 14 Jan 2021 23:37:09 +0000 (10:37 +1100)]
Add docs to la-arena crate

3 years agoPhase out SourceFileEdits in favour of a plain HashMap
Lukas Wirth [Thu, 14 Jan 2021 21:43:36 +0000 (22:43 +0100)]
Phase out SourceFileEdits in favour of a plain HashMap

3 years agoFix assert_never invoking assert_always
Lukas Wirth [Thu, 14 Jan 2021 21:43:09 +0000 (22:43 +0100)]
Fix assert_never invoking assert_always

3 years agoGroup file source edits by FileId
Lukas Wirth [Thu, 14 Jan 2021 17:35:22 +0000 (18:35 +0100)]
Group file source edits by FileId

3 years agoMerge #7271
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>
3 years agoprepare to publish el libro de arena
Aleksey Kladov [Thu, 14 Jan 2021 15:47:42 +0000 (18:47 +0300)]
prepare to publish el libro de arena

3 years agoMerge #7270
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>
3 years agoIntroduce more appropriate assertion mechanism
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.

3 years agoMerge #7269
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>
3 years agoFix server path comparison
Laurențiu Nicola [Thu, 14 Jan 2021 13:38:57 +0000 (15:38 +0200)]
Fix server path comparison

3 years agoMerge #7266
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>
3 years agoMake printin the backtrace more convenient
Aleksey Kladov [Thu, 14 Jan 2021 11:55:13 +0000 (14:55 +0300)]
Make printin the backtrace more convenient

3 years agoMerge #7265
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>
3 years agoAdd a test for #7110
Aleksey Kladov [Thu, 14 Jan 2021 11:33:02 +0000 (14:33 +0300)]
Add a test for #7110

3 years agoMerge #7264
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>
3 years agoUse --workspace when loading extern resources
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

3 years agoMerge #7211
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>
3 years agoMerge #7257
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>
3 years agoMerge #7110
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>
3 years agoMerge #7260
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>
3 years agoMerge #6809
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>