]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoUse older ubuntu for releases
Aleksey Kladov [Mon, 11 May 2020 19:32:48 +0000 (21:32 +0200)]
Use older ubuntu for releases

4 years agoMerge #4421
bors[bot] [Mon, 11 May 2020 12:21:08 +0000 (12:21 +0000)]
Merge #4421

4421: Find references to a function outside module r=flodiebold a=montekki

Fixes #4188

Yet again, it looks like although the code in
https://github.com/rust-analyzer/rust-analyzer/blob/da1f316b0246ce41d7cb8560181e294089f06ef3/crates/ra_ide_db/src/search.rs#L128-L132

may be wrong, it is not hit since the `vis` is `None` at this point. The fix is similar to the #4237 case: just add another special case to `Definition::visibility()`.

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
4 years agoNew definition_visibility method
Fedor Sakharov [Mon, 11 May 2020 11:28:14 +0000 (14:28 +0300)]
New definition_visibility method

4 years agoAlso for consts and type aliases
Fedor Sakharov [Mon, 11 May 2020 10:52:20 +0000 (13:52 +0300)]
Also for consts and type aliases

4 years agoFind references to a function outside module
Fedor Sakharov [Mon, 11 May 2020 09:25:18 +0000 (12:25 +0300)]
Find references to a function outside module

4 years agoMerge #4419
bors[bot] [Sun, 10 May 2020 23:09:27 +0000 (23:09 +0000)]
Merge #4419

4419: :arrow_up: ra_vfs r=matklad a=matklad

Fix a critical bug where \r\n line endings would accidentally sneak in
after in-memory overlay removal.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years ago:arrow_up: ra_vfs
Aleksey Kladov [Sun, 10 May 2020 22:52:11 +0000 (00:52 +0200)]
:arrow_up: ra_vfs

Fix a critical bug where \r\n line endings would accidentally sneak in
after in-memory overlay removal.

4 years agoMerge #4396
bors[bot] [Sun, 10 May 2020 18:01:20 +0000 (18:01 +0000)]
Merge #4396

4396: Improve panic message for ast_from_text r=jonas-schievink a=edwin0cheng

Related: #4368

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #4394 #4414
bors[bot] [Sun, 10 May 2020 17:47:27 +0000 (17:47 +0000)]
Merge #4394 #4414

4394: Simplify r=matklad a=Veetaha

4414: Highlighting improvements r=matklad a=matthewjasper

- `static mut`s are highlighted as `mutable`.
- The name of the macro declared by `macro_rules!` is now highlighted.

Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Matthew Jasper <mjjasper1@gmail.com>
4 years agoMerge #4406 #4410 #4411 #4417
bors[bot] [Sun, 10 May 2020 17:37:07 +0000 (17:37 +0000)]
Merge #4406 #4410 #4411 #4417

4406: Update cargo-metadata r=matklad a=edwin0cheng

This PR update `cargo-metadata` to  0.10.0 and it also relax the` serde-derive` deps to 1.0 for tests in `proc-macro-srv`.

cc @robojumper

r= @matklad  , I think you would have something to say related to https://github.com/serde-rs/json/issues/647#issue-593788429 ?

4410: Improve wording in comment r=matklad a=edwin0cheng

4411: do not remove then block when you unwrap else block #4361 r=matklad a=bnjjj

close #4361

4417: Omit default types in HirDisplay SourceCode mode r=matklad a=TimoFreiberg

Closes #4390

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
4 years agoMerge #4418
bors[bot] [Sun, 10 May 2020 17:28:59 +0000 (17:28 +0000)]
Merge #4418

4418: Refactor protocol handling r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoreq -> lsp_ext
Aleksey Kladov [Sun, 10 May 2020 17:25:37 +0000 (19:25 +0200)]
req -> lsp_ext

4 years agoDon't re-export lsp_types
Aleksey Kladov [Sun, 10 May 2020 17:24:02 +0000 (19:24 +0200)]
Don't re-export lsp_types

4 years agoBetter fn signature
Aleksey Kladov [Sun, 10 May 2020 17:14:02 +0000 (19:14 +0200)]
Better fn signature

4 years agoto_proto::semantic_tokens
Aleksey Kladov [Sun, 10 May 2020 17:09:22 +0000 (19:09 +0200)]
to_proto::semantic_tokens

4 years agoSimplify proto conversion
Aleksey Kladov [Sun, 10 May 2020 11:55:24 +0000 (13:55 +0200)]
Simplify proto conversion

Trait based infra in conv.rs is significantly more complicated than
what we actually need here.

4 years agoOmit default types in HirDisplay SourceCode mode
Timo Freiberg [Sun, 10 May 2020 16:09:22 +0000 (18:09 +0200)]
Omit default types in HirDisplay SourceCode mode

4 years agoHighlight the name in macro declarations
Matthew Jasper [Sun, 10 May 2020 15:08:54 +0000 (16:08 +0100)]
Highlight the name in macro declarations

4 years agoHighlight mutable statics as mutable
Matthew Jasper [Sun, 10 May 2020 15:08:28 +0000 (16:08 +0100)]
Highlight mutable statics as mutable

4 years agoMerge #4412
bors[bot] [Sun, 10 May 2020 14:48:04 +0000 (14:48 +0000)]
Merge #4412

4412: infer: Make expected rhs type for plain assign the lhs type r=flodiebold a=kiljacken

This fixes an issue where the following code sample would fail to infer
the type contained in the option:
```rust
fn main() {
    let mut end = None; // Was Option<{unknown}>, is now Option<bool>
    loop {
        end = Some(true);
    }
}
```

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
4 years agoinfer: Make expected rhs type for plain assign the lhs type
Emil Lauridsen [Sun, 10 May 2020 14:20:13 +0000 (16:20 +0200)]
infer: Make expected rhs type for plain assign the lhs type

This fixes an issue where the following code sample would fail to infer
the type contained in the option:
```rust
fn main() {
    let mut end = None; // TODO: Fix inference for this in RA
    loop {
        end = Some(true);
    }
}
```

4 years agodo not remove then block when you unwrap else block #4361
Benjamin Coenen [Sun, 10 May 2020 13:31:51 +0000 (15:31 +0200)]
do not remove then block when you unwrap else block #4361

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoWord fix
Edwin Cheng [Sun, 10 May 2020 13:05:09 +0000 (21:05 +0800)]
Word fix

4 years agoMerge #4409
bors[bot] [Sun, 10 May 2020 10:04:44 +0000 (10:04 +0000)]
Merge #4409

4409: Hot fix panic for function_signature r=edwin0cheng a=edwin0cheng

I am totally agree this comment:

https://github.com/rust-analyzer/rust-analyzer/blob/f1cb5b8a29ce509bf1f8d6df97d4b6586b9a2dac/crates/ra_ide/src/display/function_signature.rs#L3-L4

But let hot fix all panic for right now, it is so disturbing when browsing code...

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoRemove dbg
Edwin Cheng [Sun, 10 May 2020 10:03:44 +0000 (18:03 +0800)]
Remove dbg

4 years agoHot fix panic for function_signature
Edwin Cheng [Sun, 10 May 2020 08:27:31 +0000 (16:27 +0800)]
Hot fix panic for function_signature

4 years agoRemove dbg
Edwin Cheng [Sat, 9 May 2020 22:39:36 +0000 (06:39 +0800)]
Remove dbg

4 years agoUpdate cargo-metadata
Edwin Cheng [Sat, 9 May 2020 22:22:26 +0000 (06:22 +0800)]
Update cargo-metadata

4 years agoImprove panic message for ast_from_text
Edwin Cheng [Sat, 9 May 2020 19:46:12 +0000 (03:46 +0800)]
Improve panic message for ast_from_text

4 years agoSimplify match
veetaha [Sat, 9 May 2020 19:19:11 +0000 (22:19 +0300)]
Simplify match

4 years agoSimplify crate graph creation
veetaha [Sat, 9 May 2020 18:25:10 +0000 (21:25 +0300)]
Simplify crate graph creation

4 years agoSimplify
veetaha [Sat, 9 May 2020 17:52:52 +0000 (20:52 +0300)]
Simplify

4 years agoMerge #4392
bors[bot] [Sat, 9 May 2020 14:22:06 +0000 (14:22 +0000)]
Merge #4392

4392: Add From should not move the cursor r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd From should not move the cursor
Aleksey Kladov [Sat, 9 May 2020 14:21:10 +0000 (16:21 +0200)]
Add From should not move the cursor

4 years agoMerge #4389
bors[bot] [Sat, 9 May 2020 13:58:22 +0000 (13:58 +0000)]
Merge #4389

4389: Ascribe more correct types r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAscribe more correct types
Aleksey Kladov [Sat, 9 May 2020 13:55:59 +0000 (15:55 +0200)]
Ascribe more correct types

4 years agoMerge #4388
bors[bot] [Sat, 9 May 2020 12:49:18 +0000 (12:49 +0000)]
Merge #4388

4388: unindent -> dedent r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agounindent -> dedent
Aleksey Kladov [Sat, 9 May 2020 12:48:43 +0000 (14:48 +0200)]
unindent -> dedent

4 years agoMerge #4387
bors[bot] [Sat, 9 May 2020 12:40:45 +0000 (12:40 +0000)]
Merge #4387

4387: More fluent indent API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore fluent indent API
Aleksey Kladov [Sat, 9 May 2020 12:40:11 +0000 (14:40 +0200)]
More fluent indent API

4 years agoFix visibility
Aleksey Kladov [Sat, 9 May 2020 11:57:19 +0000 (13:57 +0200)]
Fix visibility

4 years agoMerge #4175
bors[bot] [Sat, 9 May 2020 09:29:11 +0000 (09:29 +0000)]
Merge #4175

4175: Introduce HirDisplay method for rendering source code & use it in add_function assist r=flodiebold a=TimoFreiberg

Next feature for #3639.

So far the only change in the new `HirDisplay` method is that paths are qualified, but more changes will be necessary (omitting the function name from function types, returning an error instead of printing `"{unknown}"`, probably more).

Is that approach okay?

Co-authored-by: Timo Freiberg <timo.freiberg@gmail.com>
4 years agoMerge #4381
bors[bot] [Sat, 9 May 2020 08:42:24 +0000 (08:42 +0000)]
Merge #4381

4381: Simplify r=matklad a=Veetaha

Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoSimpify project discovery
veetaha [Fri, 8 May 2020 23:51:59 +0000 (02:51 +0300)]
Simpify project discovery

4 years agoSimplify
veetaha [Fri, 8 May 2020 23:24:51 +0000 (02:24 +0300)]
Simplify

4 years agoMerge #4379
bors[bot] [Fri, 8 May 2020 20:37:14 +0000 (20:37 +0000)]
Merge #4379

4379: Handle coercing function types to function pointers in match r=matklad a=flodiebold

E.g. in
```rust
match x {
    1 => function1,
    2 => function2,
}
```
we need to try coercing both to pointers. Turns out this is a special case in
rustc as well (see the link in the comment).

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoHandle coercing function types to function pointers in match
Florian Diebold [Fri, 8 May 2020 20:12:16 +0000 (22:12 +0200)]
Handle coercing function types to function pointers in match

E.g. in
```rust
match x {
    1 => function1,
    2 => function2,
}
```
we need to try coercing both to pointers. Turns out this is a special case in
rustc as well (see the link in the comment).

4 years agoMerge #4377
bors[bot] [Fri, 8 May 2020 18:09:25 +0000 (18:09 +0000)]
Merge #4377

4377: Implement better handling of divergence r=matklad a=flodiebold

Divergence here means that for some reason, the end of a block will not be reached. We tried to model this just using the never type, but that doesn't work fully (e.g. in `let x = { loop {}; "foo" };` x should still have type `&str`); so this introduces a `diverges` flag that the type checker keeps track of, like rustc does. We also add some checking for `break`, but no support for break-with-value or labeled breaks yet.

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoAdd diagnostic for break outside of loop
Florian Diebold [Fri, 8 May 2020 17:48:03 +0000 (19:48 +0200)]
Add diagnostic for break outside of loop

4 years agoUse matches!
Florian Diebold [Fri, 8 May 2020 17:30:02 +0000 (19:30 +0200)]
Use matches!

4 years agoMerge #4366
bors[bot] [Fri, 8 May 2020 17:19:02 +0000 (17:19 +0000)]
Merge #4366

4366: Unified debug lens r=matklad a=vsrs

Right now every debug engine gets the debug executable and exports the errors on its own.

This PR unifies the way all engines work. And adds an option to configure each engine separably.
For example, this adds visualizers for both `CodeLLDB` and `C++ tools Windows debugger`
```json
"rust-analyzer.debug.engineSettings": {
    "cppvsdbg": {
        "visualizerFile": "${workspaceRoot}/rdisk.natvis"
    },
    "lldb": {
        "initCommands": [
            "command script import ${workspaceRoot}/rdisk.vis.py"
        ]
    }
}
```

Co-authored-by: vsrs <vit@conrlab.com>
Co-authored-by: vsrs <62505555+vsrs@users.noreply.github.com>
4 years agoMerge #4378
bors[bot] [Fri, 8 May 2020 16:54:38 +0000 (16:54 +0000)]
Merge #4378

4378: Add stderr to error message r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd stderr to error message
Aleksey Kladov [Fri, 8 May 2020 16:53:53 +0000 (18:53 +0200)]
Add stderr to error message

4 years agoMerge remote-tracking branch 'upstream/master' into uniformed_debug_lens
vsrs [Fri, 8 May 2020 16:34:34 +0000 (19:34 +0300)]
Merge remote-tracking branch 'upstream/master' into uniformed_debug_lens

# Conflicts:
# editors/code/src/commands/runnables.ts

4 years agoHandle break somewhat better
Florian Diebold [Fri, 8 May 2020 15:59:58 +0000 (17:59 +0200)]
Handle break somewhat better

Still no break-with-value or labels, but at least we know that `loop { break; }`
doesn't diverge.

4 years ago"rust-analyzer.debug.openDebugPane"
vsrs [Fri, 8 May 2020 16:22:26 +0000 (19:22 +0300)]
"rust-analyzer.debug.openDebugPane"

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
4 years agoImplement better handling of divergence
Florian Diebold [Fri, 8 May 2020 15:36:11 +0000 (17:36 +0200)]
Implement better handling of divergence

Divergence here means that for some reason, the end of a block will not be
reached. We tried to model this just using the never type, but that doesn't work
fully (e.g. in `let x = { loop {}; "foo" };` x should still have type `&str`);
so this introduces a `diverges` flag that the type checker keeps track of, like
rustc does.

4 years agoUse new HirDisplay variant in add_function assist
Timo Freiberg [Sat, 25 Apr 2020 14:58:28 +0000 (16:58 +0200)]
Use new HirDisplay variant in add_function assist

4 years agoNew HirDisplay method for displaying sourcecode
Timo Freiberg [Sat, 25 Apr 2020 14:57:59 +0000 (16:57 +0200)]
New HirDisplay method for displaying sourcecode

4 years agoMerge #4376
bors[bot] [Fri, 8 May 2020 13:22:05 +0000 (13:22 +0000)]
Merge #4376

4376: Fix type of byte literals r=matklad a=flodiebold

They're `&[u8; N]`, not `&[u8]` (see #4374).

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
4 years agoFix type of byte literals
Florian Diebold [Fri, 8 May 2020 13:17:35 +0000 (15:17 +0200)]
Fix type of byte literals

They're `&[u8; N]`, not `&[u8]` (see #4374).

4 years agoMerge #4375
bors[bot] [Fri, 8 May 2020 12:55:55 +0000 (12:55 +0000)]
Merge #4375

4375: Cleanup toolchain handling r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup
Aleksey Kladov [Fri, 8 May 2020 12:54:29 +0000 (14:54 +0200)]
Cleanup

4 years agoCleanup
Aleksey Kladov [Fri, 8 May 2020 10:34:39 +0000 (12:34 +0200)]
Cleanup

4 years agoRename ra_env -> ra_toolchain
Aleksey Kladov [Fri, 8 May 2020 10:25:36 +0000 (12:25 +0200)]
Rename ra_env -> ra_toolchain

4 years agoMerge #4329
bors[bot] [Fri, 8 May 2020 10:11:19 +0000 (10:11 +0000)]
Merge #4329

4329: Look for `cargo`, `rustc`, and `rustup` in standard installation path r=matklad a=cdisselkoen

Discussed in #3118.  This is approximately a 90% fix for the issue described there.

This PR creates a new crate `ra_env` with a function `get_path_for_executable()`; see docs there.  `get_path_for_executable()` improves and generalizes the function `cargo_binary()` which was previously duplicated in the `ra_project_model` and `ra_flycheck` crates.  (Both of those crates now depend on the new `ra_env` crate.)  The new function checks (e.g.) `$CARGO` and `$PATH`, but also falls back on `~/.cargo/bin` manually before erroring out.  This should allow most users to not have to worry about setting the `$CARGO` or `$PATH` variables for VSCode, which can be difficult e.g. on macOS as discussed in #3118.

I've attempted to replace all calls to `cargo`, `rustc`, and `rustup` in rust-analyzer with appropriate invocations of `get_path_for_executable()`; I don't think I've missed any in Rust code, but there is at least one invocation in TypeScript code which I haven't fixed.  (I'm not sure whether it's affected by the same problem or not.) https://github.com/rust-analyzer/rust-analyzer/blob/a4778ddb7a00f552a8e653bbf56ae9fd69cfe1d3/editors/code/src/cargo.ts#L79

I'm sure this PR could be improved a bunch, so I'm happy to take feedback/suggestions on how to solve this problem better, or just bikeshedding variable/function/crate names etc.

cc @Veetaha

Fixes #3118.

Co-authored-by: Craig Disselkoen <craigdissel@gmail.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoMerge #4372
bors[bot] [Fri, 8 May 2020 07:29:03 +0000 (07:29 +0000)]
Merge #4372

4372: Add master config for inlayHints to make disabling easy r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd master config for inlayHints to make disabling easy
Aleksey Kladov [Fri, 8 May 2020 07:28:15 +0000 (09:28 +0200)]
Add master config for inlayHints to make disabling easy

4 years agoMerge #4370
bors[bot] [Fri, 8 May 2020 00:57:29 +0000 (00:57 +0000)]
Merge #4370

4370: Move feature desugaring to the right abstraction layer r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMove feature desugaring to the right abstraction layer
Aleksey Kladov [Fri, 8 May 2020 00:56:53 +0000 (02:56 +0200)]
Move feature desugaring to the right abstraction layer

4 years agoMerge #4367
bors[bot] [Thu, 7 May 2020 20:46:25 +0000 (20:46 +0000)]
Merge #4367

4367: Update deps r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoUpdate deps
kjeremy [Thu, 7 May 2020 20:22:53 +0000 (16:22 -0400)]
Update deps

4 years agouse home crate instead of dirs
Craig Disselkoen [Thu, 7 May 2020 19:06:44 +0000 (12:06 -0700)]
use home crate instead of dirs

4 years agoMerge #4296
bors[bot] [Thu, 7 May 2020 18:50:00 +0000 (18:50 +0000)]
Merge #4296

4296: Support cargo:rustc-cfg in build.rs r=matklad a=robojumper

Fixes #4238.

Co-authored-by: robojumper <robojumper@gmail.com>
4 years agoMerge #4362
bors[bot] [Thu, 7 May 2020 17:30:13 +0000 (17:30 +0000)]
Merge #4362

4362: do not show runnables for main function outside of a binary target  r=matklad a=bnjjj

close #4356

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #4365
bors[bot] [Thu, 7 May 2020 16:49:42 +0000 (16:49 +0000)]
Merge #4365

4365: Use the correct color for structs r=matklad a=matklad

This works around https://github.com/microsoft/vscode/issues/97162

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse the correct color for structs
Aleksey Kladov [Thu, 7 May 2020 16:46:58 +0000 (18:46 +0200)]
Use the correct color for structs

This works around https://github.com/microsoft/vscode/issues/97162

4 years agoMerge #4346
bors[bot] [Thu, 7 May 2020 16:29:01 +0000 (16:29 +0000)]
Merge #4346

4346: Fix rename of enum variant visible from module r=matklad a=montekki

Probably fixes #4237

It looks like the ref is found correctly in this case but it's visibility is not correctly determined. I took a stab at fixing that by adding an implementation of `HasVisibility` for `EnumVariant` so it works more or less the same way it does for struct fields.

In other words, the `search_range` here does not contain the ref since it's not considered visible:

https://github.com/rust-analyzer/rust-analyzer/blob/efd8e34c396f1524623a495e47111f1047cf2879/crates/ra_ide_db/src/search.rs#L209-L214

Before that I tried to populate `ItemScope` with visible enum variants but that ended up with breaking tests all over the place and also it looked illogical in the end: `ItemScope` is not populated with, say, public struct fields and the same should be true for `enum` variants.

I've added two more or less identical tests: one for the case with a struct field rename and one for enum variant rename; the test for struct should probably be removed and the names should be changed.

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
4 years agoAdd CodeLLDB Rust visualization
vsrs [Thu, 7 May 2020 15:53:14 +0000 (18:53 +0300)]
Add CodeLLDB Rust visualization

4 years agoAdd separate settings for each debug engine.
vsrs [Thu, 7 May 2020 15:35:48 +0000 (18:35 +0300)]
Add separate settings for each debug engine.

4 years agoMerge #4364
bors[bot] [Thu, 7 May 2020 15:32:40 +0000 (15:32 +0000)]
Merge #4364

4364: Touch up assists public API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoSimplify
Aleksey Kladov [Thu, 7 May 2020 15:32:01 +0000 (17:32 +0200)]
Simplify

4 years agoNicer API
Aleksey Kladov [Thu, 7 May 2020 15:29:23 +0000 (17:29 +0200)]
Nicer API

4 years agoRename AssitLabel -> Assist
Aleksey Kladov [Thu, 7 May 2020 15:09:59 +0000 (17:09 +0200)]
Rename AssitLabel -> Assist

4 years agodo not show runnables for main function outside of a binary target #4356
Benjamin Coenen [Thu, 7 May 2020 14:52:14 +0000 (16:52 +0200)]
do not show runnables for main function outside of a binary target #4356

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
4 years agoMerge #4350
bors[bot] [Thu, 7 May 2020 14:28:47 +0000 (14:28 +0000)]
Merge #4350

4350:   Refactor assists API to be more convenient for adding new assists r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRefactor assists API to be more convenient for adding new assists
Aleksey Kladov [Wed, 6 May 2020 16:45:35 +0000 (18:45 +0200)]
Refactor assists API to be more convenient for adding new assists

It now duplicates completion API in its shape.

4 years agoAdd additional debug options
vsrs [Thu, 7 May 2020 14:07:58 +0000 (17:07 +0300)]
Add additional debug options

4 years agoRemove HasVisibility implementation
Fedor Sakharov [Thu, 7 May 2020 13:30:20 +0000 (16:30 +0300)]
Remove HasVisibility implementation

4 years agoMerge #4359
bors[bot] [Thu, 7 May 2020 12:32:21 +0000 (12:32 +0000)]
Merge #4359

4359: Fix panic in FunctionSignature r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoFix panic in FunctionSignature
Aleksey Kladov [Thu, 7 May 2020 12:29:01 +0000 (14:29 +0200)]
Fix panic in FunctionSignature

4 years agosimplify by using bail! macro
Craig Disselkoen [Wed, 6 May 2020 20:28:32 +0000 (13:28 -0700)]
simplify by using bail! macro

4 years agocargo fmt
Craig Disselkoen [Wed, 6 May 2020 19:47:13 +0000 (12:47 -0700)]
cargo fmt

4 years agoreturn a PathBuf instead of String
Craig Disselkoen [Wed, 6 May 2020 19:39:11 +0000 (12:39 -0700)]
return a PathBuf instead of String

4 years agoMerge #4333
bors[bot] [Wed, 6 May 2020 17:13:02 +0000 (17:13 +0000)]
Merge #4333

4333: Update Arch Linux and ALE install instructions r=matklad a=polyzen

Package has been added to the Arch repos:
https://www.archlinux.org/packages/community/x86_64/rust-analyzer/

ALE merged rust-analyzer support:
https://github.com/dense-analysis/ale/commit/70005134e5b2d40d176ee5b851ac64a296b22201

Co-authored-by: Daniel M. Capella <polyzen@archlinux.org>
4 years agoMerge #4353
bors[bot] [Wed, 6 May 2020 17:04:00 +0000 (17:04 +0000)]
Merge #4353

4353: Better mapping to TextMate scopes for keywords r=matklad a=matklad

https://github.com/microsoft/vscode/issues/94367#issuecomment-608629883

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoBetter mapping to TextMate scopes for keywords
Aleksey Kladov [Wed, 6 May 2020 17:03:17 +0000 (19:03 +0200)]
Better mapping to TextMate scopes for keywords

https://github.com/microsoft/vscode/issues/94367#issuecomment-608629883

4 years agoMerge #4316 #4351
bors[bot] [Wed, 6 May 2020 16:54:31 +0000 (16:54 +0000)]
Merge #4316 #4351

4316: do not truncate display for hover r=matklad a=bnjjj

close #4311

4351: Fix Windows server path r=matklad a=lnicola

CC @Coder-256.

Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
4 years agoFix Windows server path
Laurențiu Nicola [Wed, 6 May 2020 16:53:14 +0000 (19:53 +0300)]
Fix Windows server path

CC @Coder-256.

4 years agoMerge #4349
bors[bot] [Wed, 6 May 2020 16:46:55 +0000 (16:46 +0000)]
Merge #4349

4349: package.json: Minor configuration spelling fix r=matklad a=seanbright

Co-authored-by: Sean Bright <seanbright@users.noreply.github.com>