]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoUpdate readme.adoc
hafiz [Thu, 30 Apr 2020 18:29:21 +0000 (11:29 -0700)]
Update readme.adoc

4 years agoFix typo in language server binary docs
hafiz [Thu, 30 Apr 2020 18:21:16 +0000 (11:21 -0700)]
Fix typo in language server binary docs

4 years agoMerge #4225
bors[bot] [Thu, 30 Apr 2020 17:11:18 +0000 (17:11 +0000)]
Merge #4225

4225: Special-case try macro_rules r=matklad a=edwin0cheng

Similar to #4221, but for `macro_rules! try {}`

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #4222
bors[bot] [Thu, 30 Apr 2020 17:03:26 +0000 (17:03 +0000)]
Merge #4222

4222: Introduce C/C++ for Visual Studio Code extension as an alternative debug engine for Debug Code lens. r=matklad a=vsrs

At the moment Debug Code Lens can use only one debug engine: lldb via [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) extension.

This PR adds support of the debug engine from the [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension, as well as the configuration option. If both extensions are installed, `CodeLLDB` will be used by default.

Another new option `rust-analyzer.debug.sourceFileMap` allows, for example, to step into Rust std library during debugging. Works only with `MS C++ tools`.

On Windows:
```json
"rust-analyzer.debug.sourceFileMap": {
    "/rustc/4fb7144ed159f94491249e86d5bbd033b5d60550": "${env:USERPROFILE}/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust"
}
```
On Linux:
```json
"rust-analyzer.debug.sourceFileMap": {
    "/rustc/4fb7144ed159f94491249e86d5bbd033b5d60550": "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust"
}
```

Co-authored-by: vsrs <vit@conrlab.com>
4 years agofixed lint warning
vsrs [Thu, 30 Apr 2020 15:57:40 +0000 (18:57 +0300)]
fixed lint warning

4 years agoRemoved unnecessary extraArgs for cargo invocation
vsrs [Thu, 30 Apr 2020 15:53:34 +0000 (18:53 +0300)]
Removed unnecessary extraArgs for cargo invocation

4 years agoFixed tsfmt and eslint errors.
vsrs [Thu, 30 Apr 2020 15:41:48 +0000 (18:41 +0300)]
Fixed tsfmt and eslint errors.

4 years agoSpecial-case try macro_rules
Edwin Cheng [Thu, 30 Apr 2020 14:07:46 +0000 (22:07 +0800)]
Special-case try macro_rules

4 years agoMerge #4223
bors[bot] [Thu, 30 Apr 2020 13:21:24 +0000 (13:21 +0000)]
Merge #4223

4223: Allow to set env vars and pipe stdin via not_bash r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAllow to set env vars and pipe stdin via not_bash
Aleksey Kladov [Thu, 30 Apr 2020 13:14:55 +0000 (15:14 +0200)]
Allow to set env vars and pipe stdin via not_bash

4 years agoMerge #4221
bors[bot] [Thu, 30 Apr 2020 13:10:34 +0000 (13:10 +0000)]
Merge #4221

4221: Special-case try macro to better support 2015 edition r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agopass Cargo errors to the Debug output channel
vsrs [Thu, 30 Apr 2020 12:25:04 +0000 (15:25 +0300)]
pass Cargo  errors to the Debug output channel

4 years agoSpecial-case try macro to better support 2015 edition
Aleksey Kladov [Thu, 30 Apr 2020 12:17:14 +0000 (14:17 +0200)]
Special-case try macro to better support 2015 edition

4 years agoMerge #4219
bors[bot] [Thu, 30 Apr 2020 11:59:29 +0000 (11:59 +0000)]
Merge #4219

4219: Avoid `rustup` invocation for non-rustup rust installation r=matklad a=oxalica

Fix #4218 and #3243.

Co-authored-by: oxalica <oxalicc@pm.me>
4 years agoMerge #4210
bors[bot] [Thu, 30 Apr 2020 11:09:57 +0000 (11:09 +0000)]
Merge #4210

4210: Include function qualifiers in signature r=matklad a=oxalica

Fixes #2450

It seems there's no test for `ra_ide/display/{short_label,function_signature}`. I'm not sure how to setup it.

Manually tested:
<img width="428" alt="Screenshot_20200430_004434" src="https://user-images.githubusercontent.com/14816024/80622769-d6f1c200-8a7b-11ea-91f3-e94bfb2703c5.png">

Co-authored-by: oxalica <oxalicc@pm.me>
4 years agoMerge #4178
bors[bot] [Thu, 30 Apr 2020 10:17:40 +0000 (10:17 +0000)]
Merge #4178

4178: Validate the location of `crate` in paths r=matklad a=djrenren

**This solution does not fully handle `use` statements. See below**

This pull requests implements simple validation of usages of the `crate` keyword in `Path`s. Specifically it validates that:

- If a `PathSegment` is starts with the `crate` keyword, it is also the first segment of the `Path`
- All other usages of `crate` in `Path`s are considered errors.

This aligns with `rustc`'s rules. Unlike rustc this implementation does not issue a special error message in the case of `::crate` but it does catch the error.

Furthermore, this change does not cover all error cases. Specifically the following is not caught:

```rust
use foo::{crate}
```

This is because this check is context sensitive. From an AST perspective, `crate` is the root of the `Path`. Only by inspecting the full `UseItem` do we see that it is not in fact the root. This problem becomes worse because `UseTree`s are allowed to be arbitrarily nested:

```rust
use {crate, {{crate, foo::{crate}}}
```

So this is a hard problem to solve without essentially a breadth-first search. In a traditional compiler, I'd say this error is most easily found during the AST -> HIR conversion pass but within rust-analyzer I'm not sure where it belongs.

Under the implementation in this PR, such errors are ignored so we're *more correct* just not *entirely correct*.

Co-authored-by: John Renner <john@jrenner.net>
4 years agoAvoid `rustup` invocation for non-rustup rust installation
oxalica [Thu, 30 Apr 2020 09:42:34 +0000 (17:42 +0800)]
Avoid `rustup` invocation for non-rustup rust installation

4 years agoMerge #4216
bors[bot] [Thu, 30 Apr 2020 08:12:35 +0000 (08:12 +0000)]
Merge #4216

4216: docs(user): method chaining hints support r=flodiebold a=fannheyward

https://github.com/fannheyward/coc-rust-analyzer/issues/177#issuecomment-621109410

<img width="490" alt="" src="https://user-images.githubusercontent.com/345274/80584717-acd0dd80-8a44-11ea-9505-c408a259a5b5.png">

Co-authored-by: Heyward Fann <fannheyward@gmail.com>
4 years agoAdd tests of showing function qualifiers
oxalica [Thu, 30 Apr 2020 04:54:12 +0000 (12:54 +0800)]
Add tests of showing function qualifiers

4 years agodocs(user): method chaining hints support
Heyward Fann [Thu, 30 Apr 2020 03:38:20 +0000 (11:38 +0800)]
docs(user): method chaining hints support

https://github.com/fannheyward/coc-rust-analyzer/issues/177#issuecomment-621109410

4 years agoMerge #4162
bors[bot] [Wed, 29 Apr 2020 22:24:17 +0000 (22:24 +0000)]
Merge #4162

4162: Complete assoc. items on type parameters r=jonas-schievink a=jonas-schievink

This is fairly messy and seems to leak a lot through the `ra_hir` abstraction (`TypeNs`, `AssocItemId`, ...), so I'd be glad for any advise for how to improve this.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoif let -> match
Jonas Schievink [Wed, 29 Apr 2020 22:10:15 +0000 (00:10 +0200)]
if let -> match

4 years ago?
Jonas Schievink [Wed, 29 Apr 2020 22:09:00 +0000 (00:09 +0200)]
?

4 years agoUse or-patterns more
Jonas Schievink [Wed, 29 Apr 2020 22:06:12 +0000 (00:06 +0200)]
Use or-patterns more

4 years agoRemove `.clone()`
Jonas Schievink [Wed, 29 Apr 2020 22:05:03 +0000 (00:05 +0200)]
Remove `.clone()`

4 years agoRename to associated_type_shorthand_candidates
Jonas Schievink [Wed, 29 Apr 2020 22:03:36 +0000 (00:03 +0200)]
Rename to associated_type_shorthand_candidates

4 years agoComplete assoc. items on type parameters
Jonas Schievink [Mon, 27 Apr 2020 22:40:32 +0000 (00:40 +0200)]
Complete assoc. items on type parameters

4 years agoMerge #4212
bors[bot] [Wed, 29 Apr 2020 20:47:33 +0000 (20:47 +0000)]
Merge #4212

4212: Fix Typos on features.md r=kjeremy a=lonesometraveler

Co-authored-by: KENTARO OKUDA <lonesometraveler@mac.com>
4 years agoFix Typos on features.md
KENTARO OKUDA [Wed, 29 Apr 2020 20:00:52 +0000 (16:00 -0400)]
Fix Typos on features.md

4 years agoValidate the location of `crate` in paths
John Renner [Mon, 27 Apr 2020 17:02:47 +0000 (10:02 -0700)]
Validate the location of `crate` in paths

4 years agoInclude function qualifiers in signature
oxalica [Wed, 29 Apr 2020 16:34:46 +0000 (00:34 +0800)]
Include function qualifiers in signature

4 years agoMS C++ tools on linux
vsrs [Wed, 29 Apr 2020 13:52:53 +0000 (16:52 +0300)]
MS C++ tools on linux

4 years agoMerge #4119
bors[bot] [Wed, 29 Apr 2020 13:28:57 +0000 (13:28 +0000)]
Merge #4119

4119: Cache proc-macro dlls r=matklad a=edwin0cheng

This PR try to fix a deadlock in proc-macro srv by not unloading dlls.

Currently we load and unload dlls for each request, however rustc TLS is leaky , such that if we do it a lot of times, all TLS index will be consumed and it will be deadlocked inside panic (it is because panic itself is using TLS too).

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoMerge #4208
bors[bot] [Wed, 29 Apr 2020 13:03:40 +0000 (13:03 +0000)]
Merge #4208

4208: More principled approach for finding From trait r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore principled approach for finding From trait
Aleksey Kladov [Wed, 29 Apr 2020 12:49:54 +0000 (14:49 +0200)]
More principled approach for finding From trait

4 years agobetter configuration enum items
vsrs [Wed, 29 Apr 2020 11:13:57 +0000 (14:13 +0300)]
better configuration enum items

4 years agoMerge #4205
bors[bot] [Wed, 29 Apr 2020 11:07:55 +0000 (11:07 +0000)]
Merge #4205

4205: Fix YouComplteMe instructions link r=matklad a=bstaletic

Like I mentioned in #4098, the link to the instructions is for setting up RLS. This pull request fixes that mistake.

Co-authored-by: Boris Staletic <boris.staletic@gmail.com>
4 years agoFix YouComplteMe instructions link
Boris Staletic [Wed, 29 Apr 2020 10:50:54 +0000 (12:50 +0200)]
Fix YouComplteMe instructions link

4 years agoConfiguration settings and source maps support
vsrs [Wed, 29 Apr 2020 10:10:42 +0000 (13:10 +0300)]
Configuration settings and source maps support

4 years agoMerge #4204
bors[bot] [Wed, 29 Apr 2020 10:01:26 +0000 (10:01 +0000)]
Merge #4204

4204: Use specific pattern when translating if-let-else to match r=matklad a=matklad

We *probably* should actually use the same machinery here, as we do
for fill match arms, but just special-casing options and results seems
to be a good first step.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse specific pattern when translating if-let-else to match
Aleksey Kladov [Wed, 29 Apr 2020 09:57:06 +0000 (11:57 +0200)]
Use specific pattern when translating if-let-else to match

We *probably* should actually use the same machinery here, as we do
for fill match arms, but just special-casing options and results seems
to be a good first step.

4 years agoMerge #4203
bors[bot] [Wed, 29 Apr 2020 09:31:22 +0000 (09:31 +0000)]
Merge #4203

4203: Better filtering of qualified enum variants in completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoBetter filtering of qualified enum variants in completion
Aleksey Kladov [Wed, 29 Apr 2020 09:26:21 +0000 (11:26 +0200)]
Better filtering of qualified enum variants in completion

4 years agoMove shared assist code to utils
Aleksey Kladov [Wed, 29 Apr 2020 08:38:18 +0000 (10:38 +0200)]
Move shared assist code to utils

4 years agoMerge #4199
bors[bot] [Wed, 29 Apr 2020 06:32:58 +0000 (06:32 +0000)]
Merge #4199

4199: add ale to the nvim setup section of the readme r=matklad a=c-cube

Co-authored-by: Simon Cruanes <simon.cruanes.2007@m4x.org>
4 years agoadd ale to the nvim setup section of the readme
Simon Cruanes [Wed, 29 Apr 2020 01:01:10 +0000 (21:01 -0400)]
add ale to the nvim setup section of the readme

4 years agoMerge #4198
bors[bot] [Tue, 28 Apr 2020 21:17:03 +0000 (21:17 +0000)]
Merge #4198

4198: Complete union fields after dot r=matklad a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoMerge #4196
bors[bot] [Tue, 28 Apr 2020 21:09:37 +0000 (21:09 +0000)]
Merge #4196

4196: Rebuild rust-analyzer when launching in VS Code r=matklad a=jonas-schievink

This is usually the right thing, and previously would launch a stale r-a server.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoComplete union fields after dot
Jonas Schievink [Tue, 28 Apr 2020 20:45:46 +0000 (22:45 +0200)]
Complete union fields after dot

4 years agoBuild extension too
Jonas Schievink [Tue, 28 Apr 2020 20:32:23 +0000 (22:32 +0200)]
Build extension too

4 years agoMerge #4161
bors[bot] [Tue, 28 Apr 2020 20:12:44 +0000 (20:12 +0000)]
Merge #4161

4161: lsp-types 0.74 r=kjeremy a=kjeremy

* Fixes a bunch of param types to take partial progress into account.
* Will allow us to support insert/replace text in completions

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoMerge #4193
bors[bot] [Tue, 28 Apr 2020 20:05:08 +0000 (20:05 +0000)]
Merge #4193

4193: Make it impossible to forget to add a semantic token type / modifier r=kjeremy a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #4184
bors[bot] [Tue, 28 Apr 2020 19:57:23 +0000 (19:57 +0000)]
Merge #4184

4184: Treat comments beginning with four slashes as regular line comments r=kjeremy a=adamrk

Addresses https://github.com/rust-analyzer/rust-analyzer/issues/4040

Co-authored-by: adamrk <ark.email@gmail.com>
4 years agoFix comment prefix method for four slash comments
adamrk [Tue, 28 Apr 2020 19:13:37 +0000 (21:13 +0200)]
Fix comment prefix method for four slash comments

4 years agoMerge #4148
bors[bot] [Tue, 28 Apr 2020 18:44:34 +0000 (18:44 +0000)]
Merge #4148

4148: Simplify profiler impl (bubble up Option) r=matklad a=Veetaha

Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoMerge pull request #4157 from lnicola/glibc-releases
Aleksey Kladov [Tue, 28 Apr 2020 18:16:11 +0000 (20:16 +0200)]
Merge pull request #4157 from lnicola/glibc-releases

Use x86_64-unknown-linux-gnu for releases

4 years agoRebuild rust-analyzer when launching in VS Code
Jonas Schievink [Tue, 28 Apr 2020 18:15:52 +0000 (20:15 +0200)]
Rebuild rust-analyzer when launching in VS Code

4 years agoUse x86_64-unknown-linux-gnu for releases
Laurențiu Nicola [Sun, 26 Apr 2020 11:53:33 +0000 (14:53 +0300)]
Use x86_64-unknown-linux-gnu for releases

4 years agoMake it impossible to forget to add a semantic token type / modifier
Aleksey Kladov [Tue, 28 Apr 2020 15:14:05 +0000 (17:14 +0200)]
Make it impossible to forget to add a semantic token type / modifier

4 years agoms-vscode.cpptools debugger support, initial version.
vsrs [Tue, 28 Apr 2020 14:30:49 +0000 (17:30 +0300)]
ms-vscode.cpptools debugger support, initial version.

4 years agoMerge #4190
bors[bot] [Tue, 28 Apr 2020 14:21:22 +0000 (14:21 +0000)]
Merge #4190

4190: tiny fix in markdown ordered list r=edwin0cheng a=JOE1994

`.3` => `3.`

Co-authored-by: Youngsuk Kim <joseph942010@gmail.com>
4 years agotiny fix in markdown ordered list
Youngsuk Kim [Tue, 28 Apr 2020 14:18:12 +0000 (10:18 -0400)]
tiny fix in markdown ordered list

`.3` => `3.`

4 years agoMerge #4183
bors[bot] [Tue, 28 Apr 2020 12:45:30 +0000 (12:45 +0000)]
Merge #4183

4183: Introduce new semantic highlight token for format specifier r=matklad a=ltentrup

Follow up from #4006: Instead of using the `attribute` highlight token, introduce a new semantic token for format specifier.

Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
4 years agoIntroduce new semantic highlight token for format specifier
Leander Tentrup [Tue, 28 Apr 2020 07:44:20 +0000 (09:44 +0200)]
Introduce new semantic highlight token for format specifier

4 years agoTreat comments beginning with four slashes as regular line comments
adamrk [Tue, 28 Apr 2020 08:23:45 +0000 (10:23 +0200)]
Treat comments beginning with four slashes as regular line comments

4 years agoMerge #4173
bors[bot] [Mon, 27 Apr 2020 20:12:27 +0000 (20:12 +0000)]
Merge #4173

4173: Use core instead of std for builtin derive macros r=edwin0cheng a=edwin0cheng

Fixed #4087.

We can't use `$crate` here right now because :

1. We have to able to detect `macro` 2.0 in collecting phase for finding `rustc_builtin_macro` attrs.
2. And we have to make hygiene works for builtin derive macro.

r= @flodiebold

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
4 years agoCheck dep name to detect it is core
Edwin Cheng [Mon, 27 Apr 2020 20:11:24 +0000 (04:11 +0800)]
Check dep name to detect it is core

4 years agoUse empty-deps tricks to detect it is core
Edwin Cheng [Mon, 27 Apr 2020 19:32:47 +0000 (03:32 +0800)]
Use empty-deps tricks to detect it is core

4 years agoAdd test
Edwin Cheng [Mon, 27 Apr 2020 18:10:17 +0000 (02:10 +0800)]
Add test

4 years agoUse core instead of std for builtin derive macros
Edwin Cheng [Mon, 27 Apr 2020 17:48:55 +0000 (01:48 +0800)]
Use core instead of std for builtin derive macros

4 years agoMerge #4158
bors[bot] [Sun, 26 Apr 2020 20:33:38 +0000 (20:33 +0000)]
Merge #4158

4158: Clarify rust-analyzer binary  install r=matklad a=zoechi

Co-authored-by: Günter Zöchbauer <guenter@gzoechbauer.com>
4 years agolsp-types 0.74
kjeremy [Sun, 26 Apr 2020 20:05:22 +0000 (16:05 -0400)]
lsp-types 0.74

* Fixes a bunch of param types to take partial progress into account.
* Will allow us to support insert/replace text in completions

4 years agoAdd missing .
Günter Zöchbauer [Sun, 26 Apr 2020 17:40:13 +0000 (19:40 +0200)]
Add missing .

4 years agoMerge #4159
bors[bot] [Sun, 26 Apr 2020 15:38:36 +0000 (15:38 +0000)]
Merge #4159

4159: For associated type shorthand (T::Item), use the substs from the where clause r=matklad a=flodiebold

So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoChange install directory suggestion to `~/.local/bin`
Günter Zöchbauer [Sun, 26 Apr 2020 15:11:44 +0000 (17:11 +0200)]
Change install directory suggestion to `~/.local/bin`

instead of `~/.cargo/bin`

4 years agoxtask does not need to be installed
Günter Zöchbauer [Sun, 26 Apr 2020 15:08:15 +0000 (17:08 +0200)]
xtask does not need to be installed

because it's contained in the dart-analyzer repo.

4 years agoFor associated type shorthand (T::Item), use the substs from the where clause
Florian Diebold [Sun, 26 Apr 2020 14:56:25 +0000 (16:56 +0200)]
For associated type shorthand (T::Item), use the substs from the where clause

So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower
that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.

4 years agoClarify rust-analyzer binary install
Günter Zöchbauer [Sun, 26 Apr 2020 13:44:05 +0000 (15:44 +0200)]
Clarify rust-analyzer binary  install

4 years agoGenerate uniq name
Edwin Cheng [Sun, 26 Apr 2020 10:52:21 +0000 (18:52 +0800)]
Generate uniq name

4 years agoSimpify code
Edwin Cheng [Sun, 26 Apr 2020 09:58:56 +0000 (17:58 +0800)]
Simpify code

4 years agoFix
Edwin Cheng [Sat, 25 Apr 2020 04:48:59 +0000 (12:48 +0800)]
Fix

4 years agoCompare timestamp
Edwin Cheng [Sat, 25 Apr 2020 04:30:28 +0000 (12:30 +0800)]
Compare timestamp

4 years agoCopy dylib to temp directory
Edwin Cheng [Sat, 25 Apr 2020 04:29:49 +0000 (12:29 +0800)]
Copy dylib to temp directory

4 years agoCacheproc-macro dlls
Edwin Cheng [Fri, 24 Apr 2020 02:23:01 +0000 (10:23 +0800)]
Cacheproc-macro dlls

4 years agoMerge #4155
bors[bot] [Sun, 26 Apr 2020 08:54:42 +0000 (08:54 +0000)]
Merge #4155

4155: Precompute expected type during completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPrecompute expected type during completion
Aleksey Kladov [Sun, 26 Apr 2020 08:54:08 +0000 (10:54 +0200)]
Precompute expected type during completion

4 years agoMerge #4154
bors[bot] [Sun, 26 Apr 2020 08:41:22 +0000 (08:41 +0000)]
Merge #4154

4154: Add `cargo test` to the list of Run commands r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd `cargo test` to the list of Run commands
Aleksey Kladov [Sun, 26 Apr 2020 08:40:13 +0000 (10:40 +0200)]
Add `cargo test` to the list of Run commands

4 years agoSimplify profiler impl (bubble up Option and shorten code
veetaha [Sat, 25 Apr 2020 21:10:44 +0000 (00:10 +0300)]
Simplify profiler impl (bubble up Option and shorten code

4 years agoMerge #4146
bors[bot] [Sat, 25 Apr 2020 20:30:50 +0000 (20:30 +0000)]
Merge #4146

4146: Don't add call parens when an fn type is expected r=matklad a=jonas-schievink

This is pretty useful when dealing with callback- or fn-pointer-heavy FFI code, as I have recently.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoFix broken test
Jonas Schievink [Sat, 25 Apr 2020 20:23:56 +0000 (22:23 +0200)]
Fix broken test

4 years agoDon't add call parens when an fn type is expected
Jonas Schievink [Sat, 25 Apr 2020 19:34:38 +0000 (21:34 +0200)]
Don't add call parens when an fn type is expected

4 years agoMerge #4145
bors[bot] [Sat, 25 Apr 2020 19:30:04 +0000 (19:30 +0000)]
Merge #4145

4145: Remove dead code r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #4113 #4136 #4141 #4142
bors[bot] [Sat, 25 Apr 2020 19:23:15 +0000 (19:23 +0000)]
Merge #4113 #4136 #4141 #4142

4113: Support returning non-hierarchical symbols r=matklad a=kjeremy

If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See https://github.com/microsoft/language-server-protocol/pull/538#issuecomment-442510767 for more context.

Found while looking at #144

4136: add support for cfg feature attributes on expression #4063 r=matklad a=bnjjj

close issue #4063

4141: Fix typo r=matklad a=Veetaha

4142: Remove unnecessary async from vscode language client creation r=matklad a=Veetaha

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
4 years agoRemove dead code
Aleksey Kladov [Sat, 25 Apr 2020 19:11:18 +0000 (21:11 +0200)]
Remove dead code

4 years agoExtract messy tree handling out of profiling code
Aleksey Kladov [Sat, 25 Apr 2020 19:04:04 +0000 (21:04 +0200)]
Extract messy tree handling out of profiling code

4 years agoFix panic in NoSuchField diagnostic
Aleksey Kladov [Sat, 25 Apr 2020 18:56:25 +0000 (20:56 +0200)]
Fix panic in NoSuchField diagnostic

4 years agoRemove unnecessary async from vscode language client creation
veetaha [Sat, 25 Apr 2020 17:52:50 +0000 (20:52 +0300)]
Remove unnecessary async from vscode language client creation

4 years agoSimplify
Aleksey Kladov [Sat, 25 Apr 2020 17:50:42 +0000 (19:50 +0200)]
Simplify

4 years agoFix typo
veetaha [Sat, 25 Apr 2020 17:49:51 +0000 (20:49 +0300)]
Fix typo