]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #7321
bors[bot] [Tue, 19 Jan 2021 09:27:45 +0000 (09:27 +0000)]
Merge #7321

7321: Support runnables in macros r=matklad a=edwin0cheng

fixes  #4771

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoMerge #7346
bors[bot] [Tue, 19 Jan 2021 09:05:53 +0000 (09:05 +0000)]
Merge #7346

7346: :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 [Tue, 19 Jan 2021 09:05:27 +0000 (12:05 +0300)]
:arrow_up: rowan

3 years agoSupport runnables in macros
Edwin Cheng [Tue, 19 Jan 2021 08:58:11 +0000 (16:58 +0800)]
Support runnables in macros

3 years agoMerge #7342
bors[bot] [Tue, 19 Jan 2021 01:33:49 +0000 (01:33 +0000)]
Merge #7342

7342: Show deprecated completions for deprecated traits r=kjeremy a=SomeoneToIgnore

TIL that there are two kinds of deprecation tags and a few details about String methods.

<img width="472" alt="Screenshot 2021-01-19 at 01 11 38" src="https://user-images.githubusercontent.com/2690773/104970200-569d3380-59f3-11eb-9ee3-627b3c8a5c9d.png">

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoMerge #7341
bors[bot] [Mon, 18 Jan 2021 23:19:53 +0000 (23:19 +0000)]
Merge #7341

7341: Fix warnings when running `cargo doc --document-private-items` r=Veykril a=jyn514

These were the warnings previously:

<details>

```
warning: could not parse code block as Rust code
   --> crates/stdx/src/lib.rs:137:9
    |
137 |   ///     âˆ€ x in slice[..idx]:  pred(x)
    |  _________^
138 | | ///  && âˆ€ x in slice[idx..]: !pred(x)
    | |____^
    |
    = note: error from rustc: unknown start of token: \u{2200}

warning: 1 warning emitted

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = note: `#[warn(broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 2 warnings emitted

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = note: `#[warn(broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 2 warnings emitted
```

</details>

This does *not* fix the following warning, because it is actually rust
code and rustdoc is being over eager:

```
warning: Rust code block is empty
  --> crates/parser/src/grammar.rs:16:5
   |
16 |   //! ```
   |  _____^
17 | | //! // test function_with_zero_parameters
18 | | //! // fn foo() {}
19 | | //! ```
   | |_______^
   |
help: mark blocks that do not contain Rust code as text
   |
16 | //! ```text
   |     ^^^^^^^
```

https://github.com/rust-lang/rust/pull/79816 should make this
configurable so the warning can be `allow`ed.

Co-authored-by: Joshua Nelson <jyn514@gmail.com>
3 years agoShow deprecated completions for deprecated traits
Kirill Bulatov [Mon, 18 Jan 2021 23:08:59 +0000 (01:08 +0200)]
Show deprecated completions for deprecated traits

3 years agoConsider rustc_deprecated attr when checking for deprecation
Kirill Bulatov [Mon, 18 Jan 2021 22:02:59 +0000 (00:02 +0200)]
Consider rustc_deprecated attr when checking for deprecation

3 years agoFix warnings when running `cargo doc --document-private-items`
Joshua Nelson [Mon, 18 Jan 2021 21:44:40 +0000 (16:44 -0500)]
Fix warnings when running `cargo doc --document-private-items`

These were the warnings previously:

```
warning: could not parse code block as Rust code
   --> crates/stdx/src/lib.rs:137:9
    |
137 |   ///     âˆ€ x in slice[..idx]:  pred(x)
    |  _________^
138 | | ///  && âˆ€ x in slice[idx..]: !pred(x)
    | |____^
    |
    = note: error from rustc: unknown start of token: \u{2200}

warning: 1 warning emitted

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = note: `#[warn(broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 2 warnings emitted

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = note: `#[warn(broken_intra_doc_links)]` on by default
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: unresolved link to `package`
   --> crates/base_db/src/input.rs:181:15
    |
181 |     /// it's [package].name, can be different for other project types or even
    |               ^^^^^^^ no item named `package` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`

warning: 2 warnings emitted
```

This does *not* fix the following warning, because it is actually rust
code and rustdoc is being over eager:

```
warning: Rust code block is empty
  --> crates/parser/src/grammar.rs:16:5
   |
16 |   //! ```
   |  _____^
17 | | //! // test function_with_zero_parameters
18 | | //! // fn foo() {}
19 | | //! ```
   | |_______^
   |
help: mark blocks that do not contain Rust code as text
   |
16 | //! ```text
   |     ^^^^^^^
```

https://github.com/rust-lang/rust/pull/79816 should make this
configurable so the warning can be `allow`ed.

3 years agoMerge #7340
bors[bot] [Mon, 18 Jan 2021 20:25:26 +0000 (20:25 +0000)]
Merge #7340

7340: Remove obsolete RangeInfo usage in references r=Veykril a=Veykril

Didn't even realize these were only here for renaming as well!

bors r+

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

7336: Rename `CrateDefMap` to `DefMap` r=matklad a=jonas-schievink

I propose handling local items by computing a `DefMap` for every block expression, using the regular (early) name resolution algorithm. The result of that will be a `DefMap` that has a reference to the parent `DefMap`, which is either the one computed for the containing block expression, or the crate's root `DefMap`. Name resolution will fall back to a name in the parent `DefMap` if it cannot be resolved in the inner block.

The `DefMap`s computed for block expressions will go through a separate query that can be garbage-collected much more aggressively, since these `DefMap`s should be cheap to compute and are never part of a crate's public API.

The first step towards that is to make `CrateDefMap` not specific to crates anymore, hence this rename (if this plans sounds reasonable).

cc https://github.com/rust-analyzer/rust-analyzer/issues/7325 and https://github.com/rust-analyzer/rust-analyzer/issues/1165

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove obsolete RangeInfo usage in references
Lukas Wirth [Mon, 18 Jan 2021 20:10:01 +0000 (21:10 +0100)]
Remove obsolete RangeInfo usage in references

3 years agoMerge #7339
bors[bot] [Mon, 18 Jan 2021 19:54:40 +0000 (19:54 +0000)]
Merge #7339

7339: Delete optional arg for inline attr and add doc alias attr completion r=lnicola a=bnjjj

close #7167

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
3 years agoDelete optional arg for inline attr and add doc alias attr completion #7167
Benjamin Coenen [Mon, 18 Jan 2021 19:49:59 +0000 (20:49 +0100)]
Delete optional arg for inline attr and add doc alias attr completion #7167

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
3 years agoMerge #7297 #7338
bors[bot] [Mon, 18 Jan 2021 19:40:11 +0000 (19:40 +0000)]
Merge #7297 #7338

7297: Propose trait associated items and autoimport traits on completion r=matklad a=SomeoneToIgnore

![trait_imports](https://user-images.githubusercontent.com/2690773/104819998-6faeb480-583a-11eb-8b45-b7351b51b90e.gif)

Closes #7248

7338: Parse `impl const Trait` r=Veykril a=Veykril

Closes #7313

bors r+

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSmall token fix
Kirill Bulatov [Mon, 18 Jan 2021 19:20:02 +0000 (21:20 +0200)]
Small token fix

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMerge #7337
bors[bot] [Mon, 18 Jan 2021 19:29:09 +0000 (19:29 +0000)]
Merge #7337

7337: Remove obsolete RangeInfo usage in rename r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoRemove obsolete RangeInfo usage in rename
Lukas Wirth [Mon, 18 Jan 2021 19:25:40 +0000 (20:25 +0100)]
Remove obsolete RangeInfo usage in rename

3 years agoRename `CrateDefMap` to `DefMap`
Jonas Schievink [Mon, 18 Jan 2021 19:18:05 +0000 (20:18 +0100)]
Rename `CrateDefMap` to `DefMap`

3 years agoParse `impl const Trait`
Lukas Wirth [Mon, 18 Jan 2021 18:50:13 +0000 (19:50 +0100)]
Parse `impl const Trait`

3 years agoMerge #7332
bors[bot] [Mon, 18 Jan 2021 19:00:04 +0000 (19:00 +0000)]
Merge #7332

7332: Rename reference search uses ide_db::search directly r=matklad a=Veykril

https://github.com/rust-analyzer/rust-analyzer/pull/7251#discussion_r556644241

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

7334: Add back jemalloc support r=jonas-schievink a=jonas-schievink

jemalloc is useful due to its introspection API, which allows obtaining quick and accurate memory usage statistics without running into `mallinfo`'s limitations.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd back jemalloc support
Jonas Schievink [Mon, 18 Jan 2021 18:25:55 +0000 (19:25 +0100)]
Add back jemalloc support

3 years agoMerge #7333
bors[bot] [Mon, 18 Jan 2021 18:24:47 +0000 (18:24 +0000)]
Merge #7333

7333: cargo update r=kjeremy a=kjeremy

Update test_serialize_proc_macro for new serde version.

I'm assuming the test update is legitimate but I would like someone to double check since I'm not familiar with this area.

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agocargo update
kjeremy [Mon, 18 Jan 2021 18:13:24 +0000 (13:13 -0500)]
cargo update

Update test_serialize_proc_macro for new serde version

3 years agoMake rename reference search use ide_db::search directly
Lukas Wirth [Sun, 17 Jan 2021 20:00:55 +0000 (21:00 +0100)]
Make rename reference search use ide_db::search directly

3 years agoMerge #7331
bors[bot] [Mon, 18 Jan 2021 17:49:52 +0000 (17:49 +0000)]
Merge #7331

7331: shrink_to_fit `TokenMap`'s backing storage r=jonas-schievink a=jonas-schievink

Reduces `HygieneFrameQuery`'s memory usage by like 10 MB or so

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
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 agoshrink_to_fit `TokenMap`'s backing storage
Jonas Schievink [Mon, 18 Jan 2021 17:40:06 +0000 (18:40 +0100)]
shrink_to_fit `TokenMap`'s backing storage

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 agoProperly resolve completion edits for empty input
Kirill Bulatov [Sun, 17 Jan 2021 00:52:36 +0000 (02:52 +0200)]
Properly resolve completion edits for empty input

3 years agoDo trait solving in batch
Kirill Bulatov [Sun, 17 Jan 2021 00:22:19 +0000 (02:22 +0200)]
Do trait solving in batch

3 years agoDraft the working completion
Kirill Bulatov [Sat, 16 Jan 2021 22:53:15 +0000 (00:53 +0200)]
Draft the working completion

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 agoAdd flyimport completion for trait assoc items
Kirill Bulatov [Tue, 5 Jan 2021 08:34:03 +0000 (10:34 +0200)]
Add flyimport completion for trait assoc items

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