]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #2697
bors[bot] [Mon, 30 Dec 2019 22:49:20 +0000 (22:49 +0000)]
Merge #2697

2697: Restore internal applySourceChange command r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRestore internal applySourceChange command
Aleksey Kladov [Mon, 30 Dec 2019 22:45:50 +0000 (23:45 +0100)]
Restore internal applySourceChange command

4 years agoUse Ctx in highlighter
Aleksey Kladov [Mon, 30 Dec 2019 22:40:48 +0000 (23:40 +0100)]
Use Ctx in highlighter

4 years agoMerge #2696
bors[bot] [Mon, 30 Dec 2019 22:33:26 +0000 (22:33 +0000)]
Merge #2696

2696: Reformat with tsfmt r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReformat with tsfmt
Aleksey Kladov [Mon, 30 Dec 2019 22:30:35 +0000 (23:30 +0100)]
Reformat with tsfmt

4 years agoAdd tsfmt
Aleksey Kladov [Mon, 30 Dec 2019 22:28:13 +0000 (23:28 +0100)]
Add tsfmt

4 years agoRemove prettier
Aleksey Kladov [Mon, 30 Dec 2019 22:27:13 +0000 (23:27 +0100)]
Remove prettier

4 years agoMerge #2695
bors[bot] [Mon, 30 Dec 2019 22:24:39 +0000 (22:24 +0000)]
Merge #2695

2695: Privatize highlighting r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPrivatize highlighting
Aleksey Kladov [Mon, 30 Dec 2019 22:12:33 +0000 (23:12 +0100)]
Privatize highlighting

4 years agoMerge #2694
bors[bot] [Mon, 30 Dec 2019 21:57:08 +0000 (21:57 +0000)]
Merge #2694

2694: Refactor inlay hints r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't request inline hints repeatedly
Aleksey Kladov [Mon, 30 Dec 2019 21:53:21 +0000 (22:53 +0100)]
Don't request inline hints repeatedly

4 years agoRetry inlay hints on content modified error
Aleksey Kladov [Mon, 30 Dec 2019 21:18:16 +0000 (22:18 +0100)]
Retry inlay hints on content modified error

4 years agoThoughtlessly copy-paste a fix to a problem I don't understand
Aleksey Kladov [Mon, 30 Dec 2019 20:39:34 +0000 (21:39 +0100)]
Thoughtlessly copy-paste a fix to a problem I don't understand

4 years agoRefactor inlay hints
Aleksey Kladov [Mon, 30 Dec 2019 20:28:38 +0000 (21:28 +0100)]
Refactor inlay hints

4 years agoAdd config to Ctx
Aleksey Kladov [Mon, 30 Dec 2019 19:46:14 +0000 (20:46 +0100)]
Add config to Ctx

4 years agoEncapsulate highlighting activation
Aleksey Kladov [Mon, 30 Dec 2019 19:29:21 +0000 (20:29 +0100)]
Encapsulate highlighting activation

4 years agoMerge #2693
bors[bot] [Mon, 30 Dec 2019 19:25:01 +0000 (19:25 +0000)]
Merge #2693

2693: Encapsulate inlay hints activation r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoEncapsulate inlay hints activation
Aleksey Kladov [Mon, 30 Dec 2019 19:21:25 +0000 (20:21 +0100)]
Encapsulate inlay hints activation

4 years agoDead code
Aleksey Kladov [Mon, 30 Dec 2019 19:16:57 +0000 (20:16 +0100)]
Dead code

4 years agostatus is not a command
Aleksey Kladov [Mon, 30 Dec 2019 19:16:07 +0000 (20:16 +0100)]
status is not a command

4 years agoHints are not commands
Aleksey Kladov [Mon, 30 Dec 2019 19:10:40 +0000 (20:10 +0100)]
Hints are not commands

4 years agoMove all commands to ctx
Aleksey Kladov [Mon, 30 Dec 2019 19:07:04 +0000 (20:07 +0100)]
Move all commands to ctx

4 years agoMinor refactor
Aleksey Kladov [Mon, 30 Dec 2019 19:00:46 +0000 (20:00 +0100)]
Minor refactor

4 years agoRefactor runables
Aleksey Kladov [Mon, 30 Dec 2019 18:58:44 +0000 (19:58 +0100)]
Refactor runables

4 years agoMerge #2692
bors[bot] [Mon, 30 Dec 2019 18:36:34 +0000 (18:36 +0000)]
Merge #2692

2692: Move expand macro to the new context r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMove expand macro to the new context
Aleksey Kladov [Mon, 30 Dec 2019 18:30:30 +0000 (19:30 +0100)]
Move expand macro to the new context

4 years agoCleanup
Aleksey Kladov [Mon, 30 Dec 2019 18:12:49 +0000 (19:12 +0100)]
Cleanup

4 years agoMerge #2691
bors[bot] [Mon, 30 Dec 2019 18:08:23 +0000 (18:08 +0000)]
Merge #2691

2691: Cleanup imports r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup imports
Aleksey Kladov [Mon, 30 Dec 2019 18:07:28 +0000 (19:07 +0100)]
Cleanup imports

4 years agoRefactor show syntax tree action
Aleksey Kladov [Mon, 30 Dec 2019 18:05:41 +0000 (19:05 +0100)]
Refactor show syntax tree action

4 years agoRun prettier on all files
Aleksey Kladov [Mon, 30 Dec 2019 17:31:08 +0000 (18:31 +0100)]
Run prettier on all files

4 years agoMove parentModule to the new Ctx
Aleksey Kladov [Mon, 30 Dec 2019 16:03:05 +0000 (17:03 +0100)]
Move parentModule to the new Ctx

4 years agoRefactor applySourceChange
Aleksey Kladov [Mon, 30 Dec 2019 15:43:34 +0000 (16:43 +0100)]
Refactor applySourceChange

4 years agoMove joinLines to the new Ctx
Aleksey Kladov [Mon, 30 Dec 2019 14:50:15 +0000 (15:50 +0100)]
Move joinLines to the new Ctx

4 years agoMerge #2690
bors[bot] [Mon, 30 Dec 2019 17:27:21 +0000 (17:27 +0000)]
Merge #2690

2690: Fix server config mispell in vscode extension r=matklad a=kiljacken

Fixes #2689

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoFix server config mispell in vscode extension
Emil Lauridsen [Mon, 30 Dec 2019 17:22:06 +0000 (18:22 +0100)]
Fix server config mispell in vscode extension

4 years agoMerge #2687
bors[bot] [Mon, 30 Dec 2019 14:26:07 +0000 (14:26 +0000)]
Merge #2687

2687: Move matching brace to new Ctx r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMove matching brace to new Ctx
Aleksey Kladov [Mon, 30 Dec 2019 14:20:13 +0000 (15:20 +0100)]
Move matching brace to new Ctx

4 years agoRun prettier
Aleksey Kladov [Mon, 30 Dec 2019 14:11:30 +0000 (15:11 +0100)]
Run prettier

4 years agoAdd prettier
Aleksey Kladov [Mon, 30 Dec 2019 14:08:38 +0000 (15:08 +0100)]
Add prettier

4 years agoMore second command to Ctx
Aleksey Kladov [Mon, 30 Dec 2019 13:53:43 +0000 (14:53 +0100)]
More second command to Ctx

4 years agoStart new ctx module
Aleksey Kladov [Mon, 30 Dec 2019 13:42:59 +0000 (14:42 +0100)]
Start new ctx module

4 years agoMerge #2685
bors[bot] [Mon, 30 Dec 2019 11:32:34 +0000 (11:32 +0000)]
Merge #2685

2685: Simplify r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Mon, 30 Dec 2019 11:25:55 +0000 (12:25 +0100)]
Simplify

4 years agoRename extension.ts -> main.ts
Aleksey Kladov [Mon, 30 Dec 2019 11:19:58 +0000 (12:19 +0100)]
Rename extension.ts -> main.ts

4 years agoMerge pull request #2684 from matklad/refactor-frontend
Aleksey Kladov [Mon, 30 Dec 2019 10:49:04 +0000 (11:49 +0100)]
Merge pull request #2684 from matklad/refactor-frontend

Refactor frontend

4 years agoMinimize typescript CI
Aleksey Kladov [Mon, 30 Dec 2019 10:23:38 +0000 (11:23 +0100)]
Minimize typescript CI

4 years agoAdd rollup
Aleksey Kladov [Mon, 30 Dec 2019 08:51:44 +0000 (09:51 +0100)]
Add rollup

4 years agoMinimize TypeScript build
Aleksey Kladov [Mon, 30 Dec 2019 01:22:52 +0000 (02:22 +0100)]
Minimize TypeScript build

4 years agoTrim down launch configurations
Aleksey Kladov [Sun, 29 Dec 2019 23:15:39 +0000 (00:15 +0100)]
Trim down launch configurations

4 years agoDrop all the debugging tasks
Aleksey Kladov [Sun, 29 Dec 2019 17:02:13 +0000 (18:02 +0100)]
Drop all the debugging tasks

There are too many of them, and they no longer match the set of crates
we have.

This really should be handled in a different way, by having out
"rust-analyzer: Run" generate the appropriate lldb config on the fly.

4 years agoDrop obsolete tasks
Aleksey Kladov [Sun, 29 Dec 2019 17:01:15 +0000 (18:01 +0100)]
Drop obsolete tasks

4 years agoMerge #2681
bors[bot] [Sun, 29 Dec 2019 21:40:42 +0000 (21:40 +0000)]
Merge #2681

2681: cargo-watcher: Resolve macro call site in more cases r=matklad a=kiljacken

This resolves the actual macro call site in a few more cases, f.x. when a macro invokes `compile_error!` (I'm looking at you `ra_hir_def::path::__path`).

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoAdd related information with original error site
Emil Lauridsen [Sun, 29 Dec 2019 18:45:54 +0000 (19:45 +0100)]
Add related information with original error site

4 years agoResolve macro call site in more cases
Emil Lauridsen [Sun, 29 Dec 2019 18:14:18 +0000 (19:14 +0100)]
Resolve macro call site in more cases

4 years agoMerge #2680
bors[bot] [Sun, 29 Dec 2019 17:53:13 +0000 (17:53 +0000)]
Merge #2680

2680: Fix cargo-watcher file urls on windows r=matklad a=kiljacken

Fixes #2676

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoLowercase drive letters when getting paths from cargo check
Emil Lauridsen [Sun, 29 Dec 2019 17:27:14 +0000 (18:27 +0100)]
Lowercase drive letters when getting paths from cargo check

4 years agoMerge #2679
bors[bot] [Sun, 29 Dec 2019 16:58:29 +0000 (16:58 +0000)]
Merge #2679

2679: Resolve traits for infer using lang item infrastructure r=matklad a=kiljacken

As we already have the infrastructure for collecting lang items, use it to find the right traits when doing type-inference.

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoMerge #2061
bors[bot] [Sun, 29 Dec 2019 16:49:40 +0000 (16:49 +0000)]
Merge #2061

2061: Theme loading and "editor.tokenColorCustomizations" support. r=matklad a=seivan

Fixes: [Issue#1294](https://github.com/rust-analyzer/rust-analyzer/issues/1294#issuecomment-497450325)
TODO:
- [x] Load themes
- [x] Load existing `ralsp`-prefixed overrides from `"workbench.colorCustomizations"`.
- [x] Load overrides from `"editor.tokenColorCustomizations.textMateRules"`.
- [x] Use RA tags to load `vscode.DecorationRenderOptions` (colors) from theme & overrides.
- [x] Map RA tags to common TextMate scopes before loading colors.
- [x] Add default scope mappings in extension.
- [x] Cache mappings between settings updates.
- [x] Add scope mapping configuration manifest in `package.json`
- [x] Load configurable scope mappings from settings.
- [x] Load JSON Scheme for text mate scope rules in settings.
- [x] Update [Readme](https://github.com/seivan/rust-analyzer/blob/feature/themes/docs/user/README.md#settings).

Borrowed the theme loading (`scopes.ts`) from `Tree Sitter` with some modifications to reading `"editor.tokenColorCustomizations"` for merging with loaded themes and had to remove the async portions to be able to load it from settings updates.

~Just a PoC and an idea I toyed around with a lot of room for improvement.~
For starters, certain keywords aren't part of the standard TextMate grammar, so it still reads colors from the `ralsp` prefixed values in `"workbench.colorCustomizations"`.

But I think there's more value making the extension work with existing themes by maping some of the decoration tags to existing key or keys.

<img width="453" alt="Screenshot 2019-11-09 at 17 43 18" src="https://user-images.githubusercontent.com/55424/68531968-71b4e380-0318-11ea-924e-cdbb8d5eae06.png">
<img width="780" alt="Screenshot 2019-11-09 at 17 41 45" src="https://user-images.githubusercontent.com/55424/68531950-4b8f4380-0318-11ea-8f85-24a84efaf23b.png">
<img width="468" alt="Screenshot 2019-11-09 at 17 40 29" src="https://user-images.githubusercontent.com/55424/68531952-51852480-0318-11ea-800a-6ae9215f5368.png">

These will merge with the default ones coming with the extension, so you don't have to implement all of them and works well with overrides defined in settings.

```jsonc
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "keyword",
                "settings": {
                    "fontStyle": "bold",
                }
            },
        ]
    },
```

Edit: The idea is to work with 90% of the themes out there by working within existing scopes available that are generally styled. It's not to say I want to erase the custom Rust scopes - those should still remain and eventually worked into a custom grammar bundle for Rust specific themes that target those, I just want to make it work with generic themes offered on the market place for now.

A custom grammar bundle and themes for Rust specific scopes is out of... scope for this PR.
We'll make another round to tackle those issues.

Current fallbacks implemented

```typescript
    [
        'comment',
        [
            'comment',
            'comment.block',
            'comment.line',
            'comment.block.documentation'
        ]
    ],
    ['string', ['string']],
    ['keyword', ['keyword']],
    ['keyword.control', ['keyword.control', 'keyword', 'keyword.other']],
    [
        'keyword.unsafe',
        ['storage.modifier', 'keyword.other', 'keyword.control', 'keyword']
    ],
    ['function', ['entity.name.function']],
    ['parameter', ['variable.parameter']],
    ['constant', ['constant', 'variable']],
    ['type', ['entity.name.type']],
    ['builtin', ['variable.language', 'support.type', 'support.type']],
    ['text', ['string', 'string.quoted', 'string.regexp']],
    ['attribute', ['keyword']],
    ['literal', ['string', 'string.quoted', 'string.regexp']],
    ['macro', ['support.other']],
    ['variable', ['variable']],
    ['variable.mut', ['variable', 'storage.modifier']],
    [
        'field',
        [
            'variable.object.property',
            'meta.field.declaration',
            'meta.definition.property',
            'variable.other'
        ]
    ],
    ['module', ['entity.name.section', 'entity.other']]
```

Co-authored-by: Seivan Heidari <seivan.heidari@icloud.com>
4 years agoRemove unused hard-coded paths
Emil Lauridsen [Sun, 29 Dec 2019 16:39:44 +0000 (17:39 +0100)]
Remove unused hard-coded paths

4 years agoResolve traits in infer using lang item infrastructure
Emil Lauridsen [Sun, 29 Dec 2019 16:39:31 +0000 (17:39 +0100)]
Resolve traits in infer using lang item infrastructure

4 years agoAdd helpers for unpacking lang items
Emil Lauridsen [Sun, 29 Dec 2019 16:38:37 +0000 (17:38 +0100)]
Add helpers for unpacking lang items

4 years agoMerge #2650
bors[bot] [Sun, 29 Dec 2019 15:02:27 +0000 (15:02 +0000)]
Merge #2650

2650: Add macro call support for SourceAnalyzer::type_of r=matklad a=edwin0cheng

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #2674
bors[bot] [Sun, 29 Dec 2019 14:08:37 +0000 (14:08 +0000)]
Merge #2674

2674: Reduce visibility r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReduce visibility
Aleksey Kladov [Sun, 29 Dec 2019 14:07:53 +0000 (15:07 +0100)]
Reduce visibility

4 years agoMerge #2673
bors[bot] [Sun, 29 Dec 2019 13:48:40 +0000 (13:48 +0000)]
Merge #2673

2673: Don't add non-impl/trait containers to scope r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't add non-impl/trait containers to scope
Aleksey Kladov [Sun, 29 Dec 2019 13:46:24 +0000 (14:46 +0100)]
Don't add non-impl/trait containers to scope

4 years agoMerge #2668
bors[bot] [Sun, 29 Dec 2019 12:57:24 +0000 (12:57 +0000)]
Merge #2668

2668: In-server cargo check watching r=matklad a=kiljacken

Opening a draft now so people can follow the progress, and comment if they spot something stupid.

Things that need doing:
- [x] Running cargo check on save
- [x] Pipe through configuration options from client
- [x] Tests for parsing behavior
- [x] Remove existing cargo watch support from VSCode extension
- [x] Progress notification in VSCode extension using LSP 3.15 `$/progress` notification
- [ ] ~~Rework ra-ide diagnostics to support secondary messages~~
- [ ] ~~Make cargo-check watcher use ra-ide diagnostics~~

~~I'd love some input on whether to try to keep the status bar progress thingy for VSCode? It will require some plumbing, and maintaining yet another rust-analyzer specific LSP notification, which I'm not sure we want to.~~

Fixes #1894

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoMerge #2667
bors[bot] [Sun, 29 Dec 2019 12:24:19 +0000 (12:24 +0000)]
Merge #2667

2667: Visibility r=matklad a=flodiebold

This adds the infrastructure for handling visibility (for fields and methods, not in name resolution) in the HIR and code model, and as a first application hides struct fields from completions if they're not visible from the current module. (We might want to relax this again later, but I think it's ok for now?)

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoFix busy-waiting issue in main cargo watch thread
Emil Lauridsen [Fri, 27 Dec 2019 16:29:02 +0000 (17:29 +0100)]
Fix busy-waiting issue in main cargo watch thread

4 years agoMerge #2671
bors[bot] [Fri, 27 Dec 2019 15:52:19 +0000 (15:52 +0000)]
Merge #2671

2671: anyhow and crossbeam-queue r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoanyhow and crossbeam-queue
Jeremy Kolb [Fri, 27 Dec 2019 15:51:30 +0000 (10:51 -0500)]
anyhow and crossbeam-queue

4 years agoDon't finish main cargo watch thread when subprocess finishes.
Emil Lauridsen [Fri, 27 Dec 2019 11:43:14 +0000 (12:43 +0100)]
Don't finish main cargo watch thread when subprocess finishes.

4 years agoFix shutdown behavoir of main cargo-watch thread.
Emil Lauridsen [Fri, 27 Dec 2019 11:42:18 +0000 (12:42 +0100)]
Fix shutdown behavoir of main cargo-watch thread.

Even though this didn't error, it became clear to me that it was closing
the wrong channel, resulting in the child thread never finishing.

4 years agoAdd doc comment to module
Emil Lauridsen [Fri, 27 Dec 2019 10:57:00 +0000 (11:57 +0100)]
Add doc comment to module

4 years agoCargo fmt run
Emil Lauridsen [Fri, 27 Dec 2019 10:47:09 +0000 (11:47 +0100)]
Cargo fmt run

4 years agoShutdown/cancelation story for main cargo watch thread
Emil Lauridsen [Fri, 27 Dec 2019 10:43:05 +0000 (11:43 +0100)]
Shutdown/cancelation story for main cargo watch thread

4 years agoConsistent, hopefully robust, shutdown/cancelation story for cargo check subprocess
Emil Lauridsen [Fri, 27 Dec 2019 10:31:25 +0000 (11:31 +0100)]
Consistent, hopefully robust, shutdown/cancelation story for cargo check subprocess

4 years agovisible_from -> is_visible_from
Florian Diebold [Fri, 27 Dec 2019 10:24:31 +0000 (11:24 +0100)]
visible_from -> is_visible_from

4 years agoMerge #2657
bors[bot] [Fri, 27 Dec 2019 10:10:07 +0000 (10:10 +0000)]
Merge #2657

2657: Omit closure parameters in closure type display strings r=flodiebold a=SomeoneToIgnore

Part of https://github.com/rust-analyzer/rust-analyzer/issues/1946

I wonder, should we display the the closure trait (Fn/FnMut/FnOnce) in inlay hints instead of `|...|` at all?

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
4 years agoMove cargo watch functionality to separate crate
Emil Lauridsen [Fri, 27 Dec 2019 10:10:07 +0000 (11:10 +0100)]
Move cargo watch functionality to separate crate

4 years agoRemove Arc from RawVisibility
Florian Diebold [Thu, 26 Dec 2019 15:42:57 +0000 (16:42 +0100)]
Remove Arc from RawVisibility

Now that it's not used as a direct query return value anymore, it doesn't need
to be cheaply cloneable anymore.

4 years agoFix cross-crate glob privacy handling
Florian Diebold [Thu, 26 Dec 2019 15:31:38 +0000 (16:31 +0100)]
Fix cross-crate glob privacy handling

4 years agoRemove visibility query, instead add struct field visibility to data
Florian Diebold [Thu, 26 Dec 2019 15:22:15 +0000 (16:22 +0100)]
Remove visibility query, instead add struct field visibility to data

Methods should be handled the same, and for items the visibility will be in the
def map.

4 years agoRename ResolvedVisibility -> Visibility
Florian Diebold [Thu, 26 Dec 2019 15:00:10 +0000 (16:00 +0100)]
Rename ResolvedVisibility -> Visibility

4 years agoRename Visibility -> RawVisibility
Florian Diebold [Thu, 26 Dec 2019 14:57:14 +0000 (15:57 +0100)]
Rename Visibility -> RawVisibility

4 years agoHandle privacy for modules
Florian Diebold [Thu, 26 Dec 2019 14:49:13 +0000 (15:49 +0100)]
Handle privacy for modules

4 years agoCheck for `todo!` macros in no_todo
Florian Diebold [Wed, 25 Dec 2019 17:33:56 +0000 (18:33 +0100)]
Check for `todo!` macros in no_todo

4 years agoTake visibility into account for glob imports
Florian Diebold [Wed, 25 Dec 2019 17:05:16 +0000 (18:05 +0100)]
Take visibility into account for glob imports

4 years agoKeep track of visibility during def collection
Florian Diebold [Wed, 25 Dec 2019 14:00:10 +0000 (15:00 +0100)]
Keep track of visibility during def collection

4 years agoCollect visibility of items during nameres
Florian Diebold [Tue, 24 Dec 2019 22:45:14 +0000 (23:45 +0100)]
Collect visibility of items during nameres

4 years agoAdd doc comment
Florian Diebold [Tue, 24 Dec 2019 21:11:50 +0000 (22:11 +0100)]
Add doc comment

4 years agoMake enum variant fields public
Florian Diebold [Tue, 24 Dec 2019 21:10:44 +0000 (22:10 +0100)]
Make enum variant fields public

4 years agoHide completions for private struct fields
Florian Diebold [Tue, 24 Dec 2019 20:46:07 +0000 (21:46 +0100)]
Hide completions for private struct fields

4 years agoAdd visibility in code model for fields
Florian Diebold [Tue, 24 Dec 2019 20:45:58 +0000 (21:45 +0100)]
Add visibility in code model for fields

4 years agoAdd logic for resolving and checking visibility
Florian Diebold [Tue, 24 Dec 2019 20:23:22 +0000 (21:23 +0100)]
Add logic for resolving and checking visibility

4 years agoAdd infrastructure for visibility on syntax and hir_def level
Florian Diebold [Tue, 24 Dec 2019 19:32:42 +0000 (20:32 +0100)]
Add infrastructure for visibility on syntax and hir_def level

4 years agoMerge #2658
bors[bot] [Wed, 25 Dec 2019 20:26:08 +0000 (20:26 +0000)]
Merge #2658

2658: Only add features flags if non-empty r=matklad a=edwin0cheng

This prevent error when disabled  `all-features` in a cargo workspace, because of `--features is not allowed in the root of a virtual workspace` when running `cargo metadata`.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #2663
bors[bot] [Wed, 25 Dec 2019 19:26:18 +0000 (19:26 +0000)]
Merge #2663

2663: Fill in type params in 'add missing impl members' assist r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoKeep VSCode config mostly backwards compatible
Emil Lauridsen [Wed, 25 Dec 2019 19:23:44 +0000 (20:23 +0100)]
Keep VSCode config mostly backwards compatible