]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #6513
bors[bot] [Thu, 12 Nov 2020 17:12:21 +0000 (17:12 +0000)]
Merge #6513

6513: Support qualified function calls in remove_unused_param r=Veykril a=Veykril

Also adds a test to check that it removes unused params across files.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSupport qualified function calls in remove_unused_param
Lukas Wirth [Mon, 9 Nov 2020 18:18:26 +0000 (19:18 +0100)]
Support qualified function calls in remove_unused_param

3 years agoMerge #6529
bors[bot] [Thu, 12 Nov 2020 12:01:15 +0000 (12:01 +0000)]
Merge #6529

6529: Do not insert imports before inner comments r=Veykril a=SomeoneToIgnore

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
3 years agoRemove the fixme
Kirill Bulatov [Thu, 12 Nov 2020 11:52:24 +0000 (13:52 +0200)]
Remove the fixme

3 years agoAdd a FIXME for non-unified inner attributes
Kirill Bulatov [Wed, 11 Nov 2020 12:04:31 +0000 (14:04 +0200)]
Add a FIXME for non-unified inner attributes

3 years agoDo not insert imports before inner comments
Kirill Bulatov [Wed, 11 Nov 2020 09:37:41 +0000 (11:37 +0200)]
Do not insert imports before inner comments

3 years agoMerge #6534
bors[bot] [Thu, 12 Nov 2020 11:09:44 +0000 (11:09 +0000)]
Merge #6534

6534: Fix attachment of inner doc comments r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoFix attachment of inner doc comments
Aleksey Kladov [Thu, 12 Nov 2020 11:09:12 +0000 (12:09 +0100)]
Fix attachment of inner doc comments

3 years agoSimplify code
Aleksey Kladov [Thu, 12 Nov 2020 10:45:18 +0000 (11:45 +0100)]
Simplify code

3 years agoMerge #6531
bors[bot] [Thu, 12 Nov 2020 10:23:40 +0000 (10:23 +0000)]
Merge #6531

6531: Update crates r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUpdate tests
Aleksey Kladov [Thu, 12 Nov 2020 10:19:26 +0000 (11:19 +0100)]
Update tests

3 years agoUpdate crates
kjeremy [Wed, 11 Nov 2020 16:17:48 +0000 (11:17 -0500)]
Update crates

3 years agoMerge #6530
bors[bot] [Wed, 11 Nov 2020 16:03:42 +0000 (16:03 +0000)]
Merge #6530

6530: Do not use yanked once_cell r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoDo not use yanked once_cell
kjeremy [Wed, 11 Nov 2020 16:02:49 +0000 (11:02 -0500)]
Do not use yanked once_cell

3 years agoMerge #6526
bors[bot] [Wed, 11 Nov 2020 02:13:46 +0000 (02:13 +0000)]
Merge #6526

6526: Replace RacyFlag with OnceCell r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoReplace RacyFlag with OnceCell
Aleksey Kladov [Wed, 11 Nov 2020 02:11:40 +0000 (03:11 +0100)]
Replace RacyFlag with OnceCell

3 years agoMerge #6523
bors[bot] [Tue, 10 Nov 2020 19:39:27 +0000 (19:39 +0000)]
Merge #6523

6523: Be more pedantic when checking codeAction/resolve support r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoBe more pedantic when checking codeAction/resolve support
Aleksey Kladov [Tue, 10 Nov 2020 19:38:10 +0000 (20:38 +0100)]
Be more pedantic when checking codeAction/resolve support

3 years agoMerge #6521
bors[bot] [Tue, 10 Nov 2020 17:53:10 +0000 (17:53 +0000)]
Merge #6521

6521: Switch to upstream protocol for resolving code action r=matklad a=matklad

Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoSwitch to upstream protocol for resolving code action
Aleksey Kladov [Tue, 10 Nov 2020 17:20:01 +0000 (18:20 +0100)]
Switch to upstream protocol for resolving code action

Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.

3 years agoMerge #6512
bors[bot] [Mon, 9 Nov 2020 23:41:43 +0000 (23:41 +0000)]
Merge #6512

6512: Don't replace parent node when inserting as first child in algo::diff r=SomeoneToIgnore a=Veykril

This makes the diff a bit more detailed.

See https://github.com/rust-analyzer/rust-analyzer/pull/6287#issuecomment-723889267 for context
cc @SomeoneToIgnore

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6516
bors[bot] [Mon, 9 Nov 2020 23:35:33 +0000 (23:35 +0000)]
Merge #6516

6516: Textmate grammar: prevent `/**/` from matching block doc comments r=dustypomerleau a=dustypomerleau

Fixes #6493.

Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
3 years agofix: prevent `/**/` from matching block doc comments
Dusty Pomerleau [Mon, 9 Nov 2020 22:54:00 +0000 (09:54 +1100)]
fix: prevent `/**/` from matching block doc comments

3 years agoMerge #6472
bors[bot] [Mon, 9 Nov 2020 21:13:51 +0000 (21:13 +0000)]
Merge #6472

6472: Add `static` modifier for associated functions r=matklad a=p3achyjr

Adds static semantic token modifier to associated functions, resolves #6194

## Info

- Associated functions are more-or-less equivalent to static methods in other languages. This PR checks, for each function, whether that function has a self_param, and whether it's enclosed in a trait/impl.

## Changes

- Added method ```is_associated``` to code_model::Function. This basically gets the source from the ast, and checks whether the enclosing scope is an impl or trait.
- Added `static` to HighlightModifiers
- Added unit test

## Tests

- Ran ```cargo test```

Co-authored-by: Anatol Liu <axlui@anatols-mbp.lan>
3 years agoAdd static semantic token modifier for associated functions with no &self
Anatol Liu [Thu, 5 Nov 2020 04:08:46 +0000 (20:08 -0800)]
Add static semantic token modifier for associated functions with no &self

refactor logic into code_model.rs

address comments

3 years agoDon't replace parent node when inserting as first child in algo::diff
Lukas Wirth [Mon, 9 Nov 2020 17:42:32 +0000 (18:42 +0100)]
Don't replace parent node when inserting as first child in algo::diff

3 years agoAdd multiple file edit tes to remove_unused_param assist
Lukas Wirth [Mon, 9 Nov 2020 18:06:11 +0000 (19:06 +0100)]
Add multiple file edit tes to remove_unused_param assist

3 years agoMerge #6511
bors[bot] [Mon, 9 Nov 2020 17:12:57 +0000 (17:12 +0000)]
Merge #6511

6511: . is an operator r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years ago. is an operator
Aleksey Kladov [Mon, 9 Nov 2020 17:06:54 +0000 (18:06 +0100)]
. is an operator

closes #6498

3 years agoMerge #6510
bors[bot] [Mon, 9 Nov 2020 16:01:19 +0000 (16:01 +0000)]
Merge #6510

6510: Fix panic when extracting struct r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoFix panic when extracting struct
Aleksey Kladov [Mon, 9 Nov 2020 15:40:41 +0000 (16:40 +0100)]
Fix panic when extracting struct

3 years agoMerge #6509
bors[bot] [Mon, 9 Nov 2020 13:44:44 +0000 (13:44 +0000)]
Merge #6509

6509: Support multi-file assist tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoSupport multi-file assist tests
Aleksey Kladov [Mon, 9 Nov 2020 13:22:45 +0000 (14:22 +0100)]
Support multi-file assist tests

3 years agoMerge #6508
bors[bot] [Mon, 9 Nov 2020 13:10:23 +0000 (13:10 +0000)]
Merge #6508

6508: Fix debug for SyntaxRewriter r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoFix debug for SyntaxRewriter
Aleksey Kladov [Mon, 9 Nov 2020 13:09:49 +0000 (14:09 +0100)]
Fix debug for SyntaxRewriter

3 years agoMerge #6506
bors[bot] [Mon, 9 Nov 2020 12:28:57 +0000 (12:28 +0000)]
Merge #6506

6506: Cleanup assists r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse standard style for test code
Aleksey Kladov [Mon, 9 Nov 2020 12:28:04 +0000 (13:28 +0100)]
Use standard style for test code

3 years agoMore consistent naming
Aleksey Kladov [Mon, 9 Nov 2020 12:18:40 +0000 (13:18 +0100)]
More consistent naming

3 years agoMore consistent naming
Aleksey Kladov [Mon, 9 Nov 2020 12:07:18 +0000 (13:07 +0100)]
More consistent naming

3 years agoMerge #6465
bors[bot] [Mon, 9 Nov 2020 11:54:42 +0000 (11:54 +0000)]
Merge #6465

6465: Support multiple file edits in AssistBuilder r=matklad a=Veykril

Fixes #6459

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6501
bors[bot] [Mon, 9 Nov 2020 11:40:08 +0000 (11:40 +0000)]
Merge #6501

6501: Remove text_edit_builder api from AssistBuilder r=matklad a=Veykril

Also fixes a small bug in `expand_glob_import` in regards to the very nice looking `something::{*}` import when only one item was used. Before it would duplicate the path and just append it, causing the following wrong import `something::something::UsedItem`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6500
bors[bot] [Mon, 9 Nov 2020 09:55:46 +0000 (09:55 +0000)]
Merge #6500

6500: Add some postfix snippet r=matklad a=pksunkara

Nothing much to explain. Just a simple addition. I was recently doing some refactoring and this would have made it a bit more faster.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
3 years agoRemove text_edit_builder api from AssistBuilder
Lukas Wirth [Sun, 8 Nov 2020 22:22:11 +0000 (23:22 +0100)]
Remove text_edit_builder api from AssistBuilder

3 years agoAdd some postfix snippet
Pavan Kumar Sunkara [Sun, 8 Nov 2020 18:43:25 +0000 (19:43 +0100)]
Add some postfix snippet

3 years agoAdd static semantic token modifier for associated functions with no &self
Anatol Liu [Thu, 5 Nov 2020 04:08:46 +0000 (20:08 -0800)]
Add static semantic token modifier for associated functions with no &self

refactor logic into code_model.rs

address comments

3 years agoMerge #6497
bors[bot] [Sun, 8 Nov 2020 01:47:10 +0000 (01:47 +0000)]
Merge #6497

6497: vscode: fix tmGrammar issues around non-controlflow keywords r=dustypomerleau a=cynecx

Addresses some of the issues mentioned here: https://github.com/dustypomerleau/rust-syntax/issues/5.
In sync with https://github.com/dustypomerleau/rust-syntax/issues/6.

Co-authored-by: cynecx <me@cynecx.net>
3 years agovscode: fix tmGrammar issues around non-controlflow keywords
cynecx [Sat, 7 Nov 2020 19:12:56 +0000 (20:12 +0100)]
vscode: fix tmGrammar issues around non-controlflow keywords

3 years agoMerge #6476
bors[bot] [Sat, 7 Nov 2020 18:21:11 +0000 (18:21 +0000)]
Merge #6476

6476: Add missing AssocItems in add_custom_impl assist r=matklad a=Veykril

```rust
use std::fmt;

#[derive(Debu<|>g)]
struct Foo {
    bar: String,
}
```
->
```rust
use std::fmt;

struct Foo {
    bar: String,
}

impl fmt::Debug for Foo {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        ${0:todo!()}
    }
}
```

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6491
bors[bot] [Sat, 7 Nov 2020 11:17:55 +0000 (11:17 +0000)]
Merge #6491

6491: Textmate grammar: allow variables to terminate ranges r=dustypomerleau a=dustypomerleau

Variables were originally designed not to match after a dot, in order to avoid matching struct field access, however this resulted in variables that end ranges not being highlighted. In order to fix this we match a preceding dot, only if it's preceded by at least one other dot. Attempting to match on `(\.{2,})?` won't work, because the optional group allows struct field access to match even when one dot is present.

Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
3 years agoallow variables to terminate ranges
Dusty Pomerleau [Sat, 7 Nov 2020 11:08:29 +0000 (22:08 +1100)]
allow variables to terminate ranges

3 years agoMerge #6490
bors[bot] [Sat, 7 Nov 2020 10:45:09 +0000 (10:45 +0000)]
Merge #6490

6490: Minimize convert_integer_literal tests r=matklad a=m-ysk

Closes #6455

This PR removes some redundant tests around convert_integer_literal.

First, it removes test cases about converting integer with underscores except for just one case. This is because the process of removing of underscores in given integer literals is independent from radix.

Second, as well as underscore cases, it removes test cases about converting integer with suffix except for just one case. This is because the process of handling suffix is independent from radix.

Finally, it removes small decimal integer cases. This is because "special case where they return early" has been removed by the PR #6482, so we have no need to retain this cases.

Co-authored-by: m-ysk <myskjp@gmail.com>
3 years agoMinimize convert_integer_literal tests
m-ysk [Sat, 7 Nov 2020 09:47:25 +0000 (18:47 +0900)]
Minimize convert_integer_literal tests

3 years agoMerge #6489
bors[bot] [Sat, 7 Nov 2020 03:59:36 +0000 (03:59 +0000)]
Merge #6489

6489: Textmate grammar: Precedence fixes r=dustypomerleau a=dustypomerleau

- prevent `pat` from matching before `path` in metavariable types
- reduce the precedence of math operators so that assignment operators match correctly

Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
3 years agoprecedence fixes:
Dusty Pomerleau [Sat, 7 Nov 2020 03:56:06 +0000 (14:56 +1100)]
precedence fixes:

- prevent `pat` from matching before `path` in metavariable types
- reduce the precedence of math operators so that assignment operators match correctly

3 years agoMerge #6488
bors[bot] [Fri, 6 Nov 2020 22:52:13 +0000 (22:52 +0000)]
Merge #6488

6488: Textmate grammar: add `+=` to assignment operators r=dustypomerleau a=dustypomerleau

Fixes https://github.com/dustypomerleau/rust-syntax/issues/3.

Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
3 years agoadd `+=` to assignment operators
Dusty Pomerleau [Fri, 6 Nov 2020 22:49:08 +0000 (09:49 +1100)]
add `+=` to assignment operators

3 years agoMerge #6486
bors[bot] [Fri, 6 Nov 2020 21:54:14 +0000 (21:54 +0000)]
Merge #6486

6486: Cleanup API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoCleanup API
Aleksey Kladov [Fri, 6 Nov 2020 21:52:22 +0000 (22:52 +0100)]
Cleanup API

3 years agoMerge #6485
bors[bot] [Fri, 6 Nov 2020 21:39:02 +0000 (21:39 +0000)]
Merge #6485

6485: Remove RAW literals r=matklad a=matklad

bors r+
🤖

closes https://github.com/rust-analyzer/rust-analyzer/issues/6308

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMerge #6477
bors[bot] [Fri, 6 Nov 2020 21:32:27 +0000 (21:32 +0000)]
Merge #6477

6477: Add infer_function_return_type assist r=matklad a=Veykril

This adds an assist to insert a functions return type if it hasn't been specified yet by inferring it from the functions tail expression. This assist only becomes active if the cursor is on the tail expression. See https://github.com/rust-analyzer/rust-analyzer/issues/6303#issuecomment-714657326

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify
Aleksey Kladov [Fri, 6 Nov 2020 21:30:58 +0000 (22:30 +0100)]
Simplify

3 years agoKill RAW_ literals
Aleksey Kladov [Fri, 6 Nov 2020 21:21:56 +0000 (22:21 +0100)]
Kill RAW_ literals

Syntactically, they are indistinguishable from non-raw versions, so it
doesn't make sense to separate then *at the syntax* level.

3 years agoAdjust test-texts in infer_function_return_type
Lukas Wirth [Fri, 6 Nov 2020 20:51:15 +0000 (21:51 +0100)]
Adjust test-texts in infer_function_return_type

3 years agoEnable infer_function_return_type in return-type position
Lukas Wirth [Fri, 6 Nov 2020 20:49:03 +0000 (21:49 +0100)]
Enable infer_function_return_type in return-type position

3 years agoMerge #6484
bors[bot] [Fri, 6 Nov 2020 20:10:15 +0000 (20:10 +0000)]
Merge #6484

6484: Minor, cleanup style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMinor, cleanup style
Aleksey Kladov [Fri, 6 Nov 2020 20:09:37 +0000 (21:09 +0100)]
Minor, cleanup style

3 years agoMerge #6480
bors[bot] [Fri, 6 Nov 2020 19:41:13 +0000 (19:41 +0000)]
Merge #6480

6480: Support closure in change_return_type_to_result assist r=Veykril a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSupport closure in change_return_type_to_result assist
Lukas Wirth [Fri, 6 Nov 2020 12:19:08 +0000 (13:19 +0100)]
Support closure in change_return_type_to_result assist

3 years agoMerge #6483
bors[bot] [Fri, 6 Nov 2020 19:30:06 +0000 (19:30 +0000)]
Merge #6483

6483: don\t indent tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agodon\t indent tests
Aleksey Kladov [Fri, 6 Nov 2020 19:29:41 +0000 (20:29 +0100)]
don\t indent tests

3 years agoMerge #6482
bors[bot] [Fri, 6 Nov 2020 18:10:17 +0000 (18:10 +0000)]
Merge #6482

6482: More orthogonal API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMore orthogonal API
Aleksey Kladov [Fri, 6 Nov 2020 18:01:25 +0000 (19:01 +0100)]
More orthogonal API

3 years agoMove int parsing to IntNumber token
Aleksey Kladov [Fri, 6 Nov 2020 17:54:01 +0000 (18:54 +0100)]
Move int parsing to IntNumber token

3 years agoBetter imports
Aleksey Kladov [Fri, 6 Nov 2020 17:39:09 +0000 (18:39 +0100)]
Better imports

3 years agoGenerate token for ints and floats
Aleksey Kladov [Fri, 6 Nov 2020 17:19:24 +0000 (18:19 +0100)]
Generate token for ints and floats

3 years agoMerge #6479
bors[bot] [Fri, 6 Nov 2020 10:33:04 +0000 (10:33 +0000)]
Merge #6479

6479: Ignore RUST_SRC_PATH if it is set to invalid value r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoIgnore RUST_SRC_PATH if it is set to invalid value
Aleksey Kladov [Fri, 6 Nov 2020 10:29:54 +0000 (11:29 +0100)]
Ignore RUST_SRC_PATH if it is set to invalid value

Folks report a ton of hard-to-diagnose issues, the solution for which
is "unset RUST_SRC_PATH". Let's just ignore RUST_SRC_PATH when it
won't work anyway!

3 years agoWrap non-block expressions in closures with a block
Lukas Wirth [Fri, 6 Nov 2020 02:06:08 +0000 (03:06 +0100)]
Wrap non-block expressions in closures with a block

3 years agoIgnore unit expressions in infer_function_return_type assist
Lukas Wirth [Fri, 6 Nov 2020 01:17:34 +0000 (02:17 +0100)]
Ignore unit expressions in infer_function_return_type assist

3 years agoSupport closures in infer_function_return_type assist
Lukas Wirth [Fri, 6 Nov 2020 01:13:29 +0000 (02:13 +0100)]
Support closures in infer_function_return_type assist

3 years agoAdd infer_function_return_type assist
Lukas Wirth [Fri, 6 Nov 2020 00:47:41 +0000 (01:47 +0100)]
Add infer_function_return_type assist

3 years agoAdd static semantic token modifier for associated functions with no &self
Anatol Liu [Thu, 5 Nov 2020 04:08:46 +0000 (20:08 -0800)]
Add static semantic token modifier for associated functions with no &self

refactor logic into code_model.rs

address comments

3 years agoAdd missing AssocItems in add_custom_impl assist
Lukas Wirth [Thu, 5 Nov 2020 22:34:50 +0000 (23:34 +0100)]
Add missing AssocItems in add_custom_impl assist

3 years agoMerge #6470
bors[bot] [Thu, 5 Nov 2020 13:09:22 +0000 (13:09 +0000)]
Merge #6470

6470: Restore semantic token flickering workaround removed in #5697 r=kjeremy a=charlespierce

Closes #6452

Info
-----
* As discussed in #6452, the `Error('busy')` workaround for semantic token flickering was removed because the underlying issue was believed to be fixed in VS Code.
* It turns out that the fix isn't yet complete, so this caused flickering of the semantic highlighting when making rapid edits (e.g. typing quickly).
* This PR restores that workaround and makes it slightly more robust, covering all areas of semantic token middleware.

Changes
-----
* Added middleware functions for `provideDocumentSemanticTokens`, `provideDocumentSemanticTokensEdits`, and `provideDocumentRangeSemanticTokens` to match the 3 possible middleware hooks defined in https://github.com/microsoft/vscode-languageserver-node/blob/master/client/src/common/semanticTokens.ts#L33
* Each intercepts a `null` or `undefined` return and throws an error with the message `busy` instead, which prevents the tokens from being removed and re-added (causing the flickering behavior)

Tested
-----
* Tested locally that the flickering behavior is gone.
* There don't appear to be any significant tests of the VS Code plugin side of things, other than that it loads. Is there somewhere I can / should add tests to cover this behavior?

Co-authored-by: Charles Pierce <cpierce.grad@gmail.com>
3 years agoAdd static semantic token modifier for associated functions with no &self
Anatol Liu [Thu, 5 Nov 2020 04:08:46 +0000 (20:08 -0800)]
Add static semantic token modifier for associated functions with no &self

refactor logic into code_model.rs

3 years agoAdd static semantic token modifier for associated functions with no &self
Anatol Liu [Thu, 5 Nov 2020 04:08:46 +0000 (20:08 -0800)]
Add static semantic token modifier for associated functions with no &self

refactor logic into code_model.rs

3 years agoAdd static semantic token modifier for associated functions with no &self
Anatol Liu [Thu, 5 Nov 2020 04:08:46 +0000 (20:08 -0800)]
Add static semantic token modifier for associated functions with no &self

3 years agoMerge #6471
bors[bot] [Thu, 5 Nov 2020 03:02:46 +0000 (03:02 +0000)]
Merge #6471

6471: cargo update r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agocargo update
kjeremy [Thu, 5 Nov 2020 03:01:19 +0000 (22:01 -0500)]
cargo update

3 years agoMerge #6468
bors[bot] [Wed, 4 Nov 2020 18:35:57 +0000 (18:35 +0000)]
Merge #6468

6468: Add common issues to the bug report template r=flodiebold a=lnicola

Closes #6298

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoRestore semantic token flickering workaround removed in #5697
Charles Pierce [Wed, 4 Nov 2020 18:26:58 +0000 (10:26 -0800)]
Restore semantic token flickering workaround removed in #5697

3 years agoAdd common issues to the bug report template
Laurențiu Nicola [Wed, 4 Nov 2020 14:57:15 +0000 (16:57 +0200)]
Add common issues to the bug report template

3 years agoMerge #6467
bors[bot] [Wed, 4 Nov 2020 14:38:19 +0000 (14:38 +0000)]
Merge #6467

6467: Don't stack overflow on circular modules r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoDon't stack overflow on circular modules
Aleksey Kladov [Wed, 4 Nov 2020 14:31:35 +0000 (15:31 +0100)]
Don't stack overflow on circular modules

closes #6453

3 years agoSupport multiple workspace edits
Lukas Wirth [Wed, 4 Nov 2020 13:50:44 +0000 (14:50 +0100)]
Support multiple workspace edits

3 years agoMerge #6456
bors[bot] [Wed, 4 Nov 2020 12:37:29 +0000 (12:37 +0000)]
Merge #6456

6456: Support record variants in extract_struct_from_enum_variant r=matklad a=Veykril

As requested :)

This also prevents the assist from being disabled if a definition in the value namespace exists with the same name as our new struct since that won't cause a collision

#4468

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #6458
bors[bot] [Wed, 4 Nov 2020 12:30:09 +0000 (12:30 +0000)]
Merge #6458

6458: Qualify trait impl created by add_custom_impl assist r=matklad a=Veykril

When we find at least one trait with the same name as the derive accessible from the current module we now generate a qualified path to that trait in the generated impl.
If we don't find any we just do what was done before and emit the trait name in the generated impl.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSupport multiple file edits in AssistBuilder
Lukas Wirth [Wed, 4 Nov 2020 11:34:33 +0000 (12:34 +0100)]
Support multiple file edits in AssistBuilder

3 years agoCreate issue templates
Aleksey Kladov [Wed, 4 Nov 2020 10:32:46 +0000 (11:32 +0100)]
Create issue templates

3 years agoQualify trait impl created by add_custom_impl assist
Lukas Wirth [Tue, 3 Nov 2020 22:29:53 +0000 (23:29 +0100)]
Qualify trait impl created by add_custom_impl assist