]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #7658
bors[bot] [Sat, 13 Feb 2021 11:06:04 +0000 (11:06 +0000)]
Merge #7658

7658: Build dist-x86_64-unknown-linux-musl releases r=lnicola a=andylizi

Closes #4956.

* Artifact sample: [rust-analyzer-x86_64-unknown-linux-musl.gz](https://github.com/rust-analyzer/rust-analyzer/files/5975504/rust-analyzer-x86_64-unknown-linux-musl.gz)
* Build time: ~14m
```
$ ls -lh
-rwxr-xr-x    1 root     root       29.7M Feb 13 18:24 rust-analyzer-x86_64-unknown-linux-musl

$ ldd rust-analyzer-x86_64-unknown-linux-musl
        /lib/ld-musl-x86_64.so.1 (0x7f2751f13000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7f2750a78000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f2751f13000)

$ ./rust-analyzer-x86_64-unknown-linux-musl --version
rust-analyzer 63fcf65
```

I can do `aarch64-unknown-linux-musl` if it's also needed.

Co-authored-by: andylizi <andylizi666@gmail.com>
3 years agoBuild dist-x86_64-unknown-linux-musl releases
andylizi [Sat, 13 Feb 2021 08:39:02 +0000 (16:39 +0800)]
Build dist-x86_64-unknown-linux-musl releases

3 years agoMerge #7655
bors[bot] [Fri, 12 Feb 2021 18:20:27 +0000 (18:20 +0000)]
Merge #7655

7655: Include a commit log summary in the changelog r=matklad a=lnicola

This version omits any direct pushes, and maybe even pull requests merged from the GitHub UI. But I think it makes writing the release notes easier.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoMerge #7358
bors[bot] [Fri, 12 Feb 2021 18:01:36 +0000 (18:01 +0000)]
Merge #7358

7358: Refactor reference searching to work with the ast  r=matklad a=Veykril

Addresses #4290

This PR is still a bit unpolished. Its main purpose for now is to discuss the direction of the changes as to whether this seems to be the right approach or not. I annotated a few parts with reviews to give a better overwiew without having to read into it too much.

Big part of the diff are test output changes in the `references` module.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUpdate references test output
Lukas Wirth [Fri, 12 Feb 2021 18:00:37 +0000 (19:00 +0100)]
Update references test output

3 years agoUse NameLike in FileReference directly as its not exported from ide anymore
Lukas Wirth [Tue, 9 Feb 2021 15:03:39 +0000 (16:03 +0100)]
Use NameLike in FileReference directly as its not exported from ide anymore

3 years agoRefactor reference searching to work with the ast
Lukas Wirth [Sun, 7 Feb 2021 17:38:12 +0000 (18:38 +0100)]
Refactor reference searching to work with the ast

3 years agoRemove unused ReferenceSearchResult functions
Lukas Wirth [Mon, 18 Jan 2021 20:41:13 +0000 (21:41 +0100)]
Remove unused ReferenceSearchResult functions

3 years agoInclude a commit log summary in the changelog
Laurențiu Nicola [Fri, 12 Feb 2021 17:52:51 +0000 (19:52 +0200)]
Include a commit log summary in the changelog

3 years agoMerge #7650
bors[bot] [Fri, 12 Feb 2021 17:16:02 +0000 (17:16 +0000)]
Merge #7650

7650: Add `find_impl_block_end` assist helper r=Veykril a=yoshuawuyts

Fixes #7605. This makes it so assists can use helpers to either append a method to the start or the end of an `impl` block. Thanks!

@Veykril if this is merged, perhaps it could be good to update the gif in https://github.com/rust-analyzer/rust-analyzer/pull/7617#issuecomment-776622135 ? -- this should fix the ordering issue when generating multiple methods.

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
3 years agoMerge #7639
bors[bot] [Fri, 12 Feb 2021 17:02:42 +0000 (17:02 +0000)]
Merge #7639

7639: Bump rust to latest stable 1.50 r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoBump rust to latest stable 1.50
kjeremy [Thu, 11 Feb 2021 15:12:20 +0000 (10:12 -0500)]
Bump rust to latest stable 1.50

3 years agoAdd `find_impl_block_end` assist helper
Yoshua Wuyts [Fri, 12 Feb 2021 10:48:43 +0000 (11:48 +0100)]
Add `find_impl_block_end` assist helper

3 years agoMerge #7652
bors[bot] [Fri, 12 Feb 2021 16:45:58 +0000 (16:45 +0000)]
Merge #7652

7652: Fix slow tests sometimes failing r=flodiebold a=flodiebold

In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
3 years agoRemove pinned Rust version again
Florian Diebold [Fri, 12 Feb 2021 14:59:29 +0000 (15:59 +0100)]
Remove pinned Rust version again

3 years agoFix slow tests sometimes failing
Florian Diebold [Fri, 12 Feb 2021 14:58:29 +0000 (15:58 +0100)]
Fix slow tests sometimes failing

In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.

3 years agoMerge #7653
bors[bot] [Fri, 12 Feb 2021 15:10:50 +0000 (15:10 +0000)]
Merge #7653

7653: Document config pattern r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoDocument config pattern
Aleksey Kladov [Fri, 12 Feb 2021 15:10:16 +0000 (18:10 +0300)]
Document config pattern

3 years agoMerge #7644
bors[bot] [Fri, 12 Feb 2021 13:18:30 +0000 (13:18 +0000)]
Merge #7644

7644: Primitive completion r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7642

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #7638 #7648
bors[bot] [Fri, 12 Feb 2021 13:01:44 +0000 (13:01 +0000)]
Merge #7638 #7648

7638: libloading 0.7 r=kjeremy a=kjeremy

See https://docs.rs/libloading/0.7.0/libloading/changelog/r0_7_0/index.html

7648: fix nightly warning `legacy_derive_helpers` r=lnicola a=peddermaster2

With a recent nightly (e.g. 2021-02-10) a warning comes up. This PR reorders the attributes to fix the warning.

See https://github.com/rust-lang/rust/issues/79202

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Peter Wischer <peter.wischer@lwl.org>
3 years agofix nightly warning `legacy_derive_helpers`
Peter Wischer [Fri, 12 Feb 2021 12:46:30 +0000 (13:46 +0100)]
fix nightly warning `legacy_derive_helpers`

see https://github.com/rust-lang/rust/issues/79202

3 years agoMerge #7651
bors[bot] [Fri, 12 Feb 2021 12:06:26 +0000 (12:06 +0000)]
Merge #7651

7651: Pin Rust to 1.49.0 on CI r=jonas-schievink a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoPin Rust to 1.49.0 on CI
Jonas Schievink [Fri, 12 Feb 2021 11:09:54 +0000 (12:09 +0100)]
Pin Rust to 1.49.0 on CI

3 years agoComplete builtin type paths
Jonas Schievink [Thu, 11 Feb 2021 18:52:46 +0000 (19:52 +0100)]
Complete builtin type paths

3 years agoWrap `BuiltinType` in code model
Jonas Schievink [Thu, 11 Feb 2021 18:52:33 +0000 (19:52 +0100)]
Wrap `BuiltinType` in code model

3 years agolibloading 0.7
kjeremy [Thu, 11 Feb 2021 15:07:49 +0000 (10:07 -0500)]
libloading 0.7

See https://docs.rs/libloading/0.7.0/libloading/changelog/r0_7_0/index.html

3 years agoMerge #7631
bors[bot] [Wed, 10 Feb 2021 17:43:06 +0000 (17:43 +0000)]
Merge #7631

7631: Add test for #1165 r=jonas-schievink a=jonas-schievink

Closes #1165

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd test for #1165
Jonas Schievink [Wed, 10 Feb 2021 17:42:35 +0000 (18:42 +0100)]
Add test for #1165

Closes #1165

3 years agoMerge #7630
bors[bot] [Wed, 10 Feb 2021 16:37:45 +0000 (16:37 +0000)]
Merge #7630

7630: Slightly expand test r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoSlightly expand test
Jonas Schievink [Wed, 10 Feb 2021 16:37:15 +0000 (17:37 +0100)]
Slightly expand test

3 years agoMerge #7627
bors[bot] [Wed, 10 Feb 2021 15:59:49 +0000 (15:59 +0000)]
Merge #7627

7627: infer: update resolver when descending into block r=jonas-schievink a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd more tests
Jonas Schievink [Wed, 10 Feb 2021 14:54:21 +0000 (15:54 +0100)]
Add more tests

3 years agoPut the old resolver back
Jonas Schievink [Wed, 10 Feb 2021 14:12:45 +0000 (15:12 +0100)]
Put the old resolver back

3 years agoUpdate fixed tests
Jonas Schievink [Wed, 10 Feb 2021 13:48:52 +0000 (14:48 +0100)]
Update fixed tests

3 years agoinfer: update resolver when descending into block
Jonas Schievink [Wed, 10 Feb 2021 13:41:54 +0000 (14:41 +0100)]
infer: update resolver when descending into block

3 years agoMerge #7625
bors[bot] [Wed, 10 Feb 2021 11:38:56 +0000 (11:38 +0000)]
Merge #7625

7625: Add **Copy Run Command Line** command for vscode r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd **Copy Run Command Line** command for vscode
Aleksey Kladov [Wed, 10 Feb 2021 11:28:13 +0000 (14:28 +0300)]
Add **Copy Run Command Line** command for vscode

This is useful when you want to, e.g., run a specific test in a terminal
with `--release`.

3 years agoMerge #7617
bors[bot] [Wed, 10 Feb 2021 10:32:36 +0000 (10:32 +0000)]
Merge #7617

7617: Add getter/setter assists r=Veykril a=yoshuawuyts

This patch makes progress towards the design outlined in https://github.com/rust-analyzer/rust-analyzer/issues/5943, and includes a small refactor which closes https://github.com/rust-analyzer/rust-analyzer/issues/7607. All together this patch does 4 things:

- Adds a `generate_getter` assist.
- Adds a `generate_getter_mut` assist.
- Adds a `generate_setter` assist.
- Moves the `generate_impl_text` function from `generate_new` into `utils` (which closes #7607).

## Design Notes

I've chosen to follow the [Rust API guidelines on getters](https://rust-lang.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter) as closely as possible. This deliberately leaves "builder pattern"-style setters out of scope.

Also, similar to https://github.com/rust-analyzer/rust-analyzer/pull/7570 this assist generates doc comments. I think this should work well in most cases, and for the few where it doesn't it's probably easily edited. This makes it slightly less correct than the #7570 implementation, but I think this is still useful enough to include for many of the same reasons.

The reason why this PR contains 3 assists, rather than 1, is because each of them is so similar to the others that it felt more noisy to do them separately than all at once. The amount of code added does not necessarily reflect that, but hope that still makes sense.

## Examples

**Input**
```rust
struct Person {
    name: String,     // <- cursor on "name"
}
```

**generate getter**
```rust
struct Person {
    name: String,
}

impl Person {
    /// Get a reference to the person's name.
    fn name(&self) -> &String {
        &self.name
    }
}
```

**generate mut getter**
```rust
struct Person {
    name: String,
}

impl Person {
    /// Get a mutable reference to the person's name.
    fn name_mut(&mut self) -> &mut String {
        &mut self.name
    }
}
```

**generate setter**
```rust
struct Person {
    name: String,
}

impl Person {
    /// Set the person's name.
    fn set_name(&mut self, name: String) {
        self.name = name;
    }
}
```

Co-authored-by: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
3 years agoMerge #7591 #7622
bors[bot] [Wed, 10 Feb 2021 08:44:53 +0000 (08:44 +0000)]
Merge #7591 #7622

7591: Fix/no floating promises r=matklad a=sahandevs

closes #3515

- added `@typescript-eslint/no-floating-promises: error` rule
- changed `"no-console": ["error"]` to `"no-console": ["error", { allow: ["warn", "error"] }]` (we at least log the error messages of the floating promises)
- fixed lint/compile errors

7622: Resolve TupleStructPat in SourceAnalyzer::resolve_path r=Veykril a=Veykril

Closes #7594
bors r+

Co-authored-by: Sahandevs <sahandevs@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoResolve TupleStructPat in SourceAnalyzer::resolve_path
Lukas Wirth [Wed, 10 Feb 2021 08:29:10 +0000 (09:29 +0100)]
Resolve TupleStructPat in SourceAnalyzer::resolve_path

3 years agoMerge #7621
bors[bot] [Wed, 10 Feb 2021 08:34:04 +0000 (08:34 +0000)]
Merge #7621

7621: Use track caller in test documentation r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse track caller in test documentation
Aleksey Kladov [Wed, 10 Feb 2021 08:26:48 +0000 (11:26 +0300)]
Use track caller in test documentation

3 years agoMerge #7619
bors[bot] [Wed, 10 Feb 2021 08:25:12 +0000 (08:25 +0000)]
Merge #7619

7619: Add #[track_caller] to assist tests r=matklad a=yoshuawuyts

This points the source of a failed assertion to the code which called it, rather than the location within the assertion helper method. While working on https://github.com/rust-analyzer/rust-analyzer/pull/7617 I had trouble locating some failing tests, and it was only by adding these attributes during development that I was able to locate them.

This is only applied to test helpers, which means it comes at no runtime cost. And even then: I didn't experience any noticeable performance with this enabled or disabled. Mostly just a more pleasant experience debugging test failures (:

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
3 years agoAdd #[track_caller] to assist tests
Yoshua Wuyts [Tue, 9 Feb 2021 23:16:00 +0000 (00:16 +0100)]
Add #[track_caller] to assist tests

3 years agoAdd getter/setter assists
Yoshua Wuyts [Tue, 9 Feb 2021 11:30:13 +0000 (12:30 +0100)]
Add getter/setter assists

Finish implementing `generate_setter` assists

Make `generate_impl_text` util generic

generate getter methods

Fix getter / setter naming

It's now in-line with the Rust API naming guidelines: https://rust-lang.github.io/api-guidelines/naming.html#getter-names-follow-rust-convention-c-getter

apply clippy

Improve examples

3 years agoMerge #7618
bors[bot] [Tue, 9 Feb 2021 20:37:26 +0000 (20:37 +0000)]
Merge #7618

7618: Show qualified variant pattern completions r=Veykril a=Veykril

![UTMZyplssw](https://user-images.githubusercontent.com/3757771/107425157-e9c31800-6b1e-11eb-8963-96653115f8e0.gif)
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoShow qualified variant pattern completions
Lukas Wirth [Tue, 9 Feb 2021 20:32:05 +0000 (21:32 +0100)]
Show qualified variant pattern completions

3 years agoMerge #7616
bors[bot] [Tue, 9 Feb 2021 19:38:39 +0000 (19:38 +0000)]
Merge #7616

7616: Show `Self` pattern and Self-prefixed enum-variant completions r=Veykril a=Veykril

![jDfQXNE0qZ](https://user-images.githubusercontent.com/3757771/107413514-1ff99b00-6b11-11eb-88b3-126cd106b514.gif)
![JpogVIgloq](https://user-images.githubusercontent.com/3757771/107413519-212ac800-6b11-11eb-8282-51115468dccc.gif)

Variant pattern completions are to be done still.

Closes #6549, at least that should address all that's left from that issue from what I can see.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #7615
bors[bot] [Tue, 9 Feb 2021 18:53:27 +0000 (18:53 +0000)]
Merge #7615

7615: Add parsing benchmark r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd parsing benchmark
Aleksey Kladov [Tue, 9 Feb 2021 18:52:34 +0000 (21:52 +0300)]
Add parsing benchmark

3 years agoShow Self pattern completions for Adts if inside impls
Lukas Wirth [Tue, 9 Feb 2021 18:47:21 +0000 (19:47 +0100)]
Show Self pattern completions for Adts if inside impls

3 years agoShow completions for enum variant with self prefix if inside impl
Lukas Wirth [Tue, 9 Feb 2021 18:04:39 +0000 (19:04 +0100)]
Show completions for enum variant with self prefix if inside impl

3 years agoMerge #7614
bors[bot] [Tue, 9 Feb 2021 18:01:04 +0000 (18:01 +0000)]
Merge #7614

7614: Unleash inner item resolution to users r=jonas-schievink a=jonas-schievink

![Peek 2021-02-09 17-30](https://user-images.githubusercontent.com/1786438/107394800-8627f300-6afc-11eb-8662-ed07226bc58f.gif)

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove unneeded return
Jonas Schievink [Tue, 9 Feb 2021 17:40:05 +0000 (18:40 +0100)]
Remove unneeded return

3 years agoMerge #7613
bors[bot] [Tue, 9 Feb 2021 17:35:53 +0000 (17:35 +0000)]
Merge #7613

7613: Benchmarking infrastructure r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoInfra for "unit" benchmarking
Aleksey Kladov [Tue, 9 Feb 2021 16:29:40 +0000 (19:29 +0300)]
Infra for "unit" benchmarking

3 years agoRemove `pub`
Jonas Schievink [Tue, 9 Feb 2021 16:36:10 +0000 (17:36 +0100)]
Remove `pub`

3 years agoUse `block_def_map` in `Resolver`
Jonas Schievink [Tue, 9 Feb 2021 16:27:04 +0000 (17:27 +0100)]
Use `block_def_map` in `Resolver`

This required a few changes to not bail out immediately if a
`ModuleScope` doesn't resolve a path.

The `LocalItemsScope` hack is now removed.

3 years agoTeach `find_path` about inner items
Jonas Schievink [Tue, 9 Feb 2021 16:25:03 +0000 (17:25 +0100)]
Teach `find_path` about inner items

3 years agoAdd another block def map test
Jonas Schievink [Tue, 9 Feb 2021 16:24:43 +0000 (17:24 +0100)]
Add another block def map test

3 years agoMake `with_ancestor_maps` public
Jonas Schievink [Tue, 9 Feb 2021 16:23:25 +0000 (17:23 +0100)]
Make `with_ancestor_maps` public

3 years agoAdd `TestDB::module_at_position`
Jonas Schievink [Tue, 9 Feb 2021 16:22:57 +0000 (17:22 +0100)]
Add `TestDB::module_at_position`

3 years agoAdd expression scopes for blocks
Jonas Schievink [Tue, 9 Feb 2021 16:11:44 +0000 (17:11 +0100)]
Add expression scopes for blocks

3 years agoMerge #7611
bors[bot] [Tue, 9 Feb 2021 15:30:09 +0000 (15:30 +0000)]
Merge #7611

7611: Cleanups r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agorestore accidentally deleted test
Aleksey Kladov [Tue, 9 Feb 2021 15:29:15 +0000 (18:29 +0300)]
restore accidentally deleted test

3 years agoMore precise navigation to parent
Aleksey Kladov [Tue, 9 Feb 2021 15:21:09 +0000 (18:21 +0300)]
More precise navigation to parent

3 years agoCleanup tests
Aleksey Kladov [Tue, 9 Feb 2021 15:13:11 +0000 (18:13 +0300)]
Cleanup tests

3 years agoMerge #7597
bors[bot] [Tue, 9 Feb 2021 14:58:14 +0000 (14:58 +0000)]
Merge #7597

7597: Set remote branch on xtask promote r=matklad a=lnicola

to hopefully fix this:

```
$ git switch master
Already on 'master'
Your branch is up to date with 'upstream/master'.
$ git fetch upstream
$ git reset --hard upstream/master
HEAD is now at 921ec4b3fca Auto merge of #81313 - LeSeulArtichaut:revert-32558, r=jyn514
$ git submodule update --recursive
Submodule path 'src/tools/rust-analyzer': checked out '1a59f75cdaa730c16a694a4294eccf6dfe6fe0ad'
$ git switch -c rust-analyzer-2021-02-08
Switched to a new branch 'rust-analyzer-2021-02-08'
$ git fetch origin
$ git reset --hard origin/release
HEAD is now at 336909b63 Merge #7587
$ git add src/tools/rust-analyzer
$ git commit "-m:arrow_up: rust-analyzer"
[rust-analyzer-2021-02-08 1774ec1a683] :arrow_up: rust-analyzer
 1 file changed, 1 insertion(+), 1 deletion(-)
$ git push
fatal: The current branch rust-analyzer-2021-02-08 has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin rust-analyzer-2021-02-08

Error: command `git push` failed, exit code: 128
```

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoTrack remote branch on xtask promote
Laurențiu Nicola [Mon, 8 Feb 2021 14:20:42 +0000 (16:20 +0200)]
Track remote branch on xtask promote

3 years agoMerge #7610
bors[bot] [Tue, 9 Feb 2021 14:49:02 +0000 (14:49 +0000)]
Merge #7610

7610: Cleanup test r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoCleanup test
Aleksey Kladov [Tue, 9 Feb 2021 14:48:25 +0000 (17:48 +0300)]
Cleanup test

3 years agoFix highlighting of injected attributes
Aleksey Kladov [Tue, 9 Feb 2021 14:41:12 +0000 (17:41 +0300)]
Fix highlighting of injected attributes

3 years agoModernize tests
Aleksey Kladov [Tue, 9 Feb 2021 14:23:35 +0000 (17:23 +0300)]
Modernize tests

3 years agouse await instead
Sahandevs [Tue, 9 Feb 2021 14:12:46 +0000 (17:42 +0330)]
use await instead

3 years agoMerge #7602
bors[bot] [Mon, 8 Feb 2021 18:22:35 +0000 (18:22 +0000)]
Merge #7602

7602: Check for dyn impls in method resolution r=flodiebold a=Veykril

Fixes #6777

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoCheck for dyn impls in method resolution
Lukas Wirth [Mon, 8 Feb 2021 18:13:54 +0000 (19:13 +0100)]
Check for dyn impls in method resolution

3 years agoMerge #7600
bors[bot] [Mon, 8 Feb 2021 16:49:45 +0000 (16:49 +0000)]
Merge #7600

7600: Update crates r=flodiebold a=kjeremy

Pulls in https://github.com/rust-lang/chalk/pull/682

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoUpdate crates
kjeremy [Mon, 8 Feb 2021 16:38:51 +0000 (11:38 -0500)]
Update crates

Pulls in https://github.com/rust-lang/chalk/pull/682

3 years agoMerge #7599
bors[bot] [Mon, 8 Feb 2021 16:08:31 +0000 (16:08 +0000)]
Merge #7599

7599: Add emacs guide r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd emacs guide
Aleksey Kladov [Mon, 8 Feb 2021 16:08:02 +0000 (19:08 +0300)]
Add emacs guide

3 years agoMerge #7595
bors[bot] [Mon, 8 Feb 2021 10:34:46 +0000 (10:34 +0000)]
Merge #7595

7595: Add `config: &CargoConfig` parameter to `fn load_cargo(…)` r=matklad a=regexident

For projects using rust-analyzer as a library it is desirable to be able to provide a custom-config to `fn load_cargo(…)` to pass features, etc, rather than having to copy & paste `fn load_cargo(…)` into one's project and maintain a fork of it and keep it in sync with upstream.

Co-authored-by: Vincent Esche <regexident@gmail.com>
3 years agoConsolidate `fn load_cargo(…)` parameters into `struct LoadCargoConfig { … }`
Vincent Esche [Mon, 8 Feb 2021 10:30:16 +0000 (11:30 +0100)]
Consolidate `fn load_cargo(…)` parameters into `struct LoadCargoConfig { … }`

3 years agoAdd `config: &CargoConfig` parameter to `fn load_cargo(…)`
Vincent Esche [Mon, 8 Feb 2021 10:00:55 +0000 (11:00 +0100)]
Add `config: &CargoConfig` parameter to `fn load_cargo(…)`

3 years agoMerge #7592
bors[bot] [Mon, 8 Feb 2021 09:16:01 +0000 (09:16 +0000)]
Merge #7592

7592: [Doc] Note about Eclipse IDE support r=lnicola a=mickaelistria

Co-authored-by: Mickael Istria <mistria@redhat.com>
3 years ago[Doc] Note about Eclipse IDE support
Mickael Istria [Sun, 7 Feb 2021 20:37:22 +0000 (21:37 +0100)]
[Doc] Note about Eclipse IDE support

3 years agoMerge #7593
bors[bot] [Mon, 8 Feb 2021 08:00:41 +0000 (08:00 +0000)]
Merge #7593

7593: fix: add for keyword in completion #7588 r=lnicola a=gowrizrh

Fixes #7588
bors r+

Co-authored-by: Gowri <gowri.sankar@aligent.com.au>
Co-authored-by: Gowri <gowrizrh@gmail.com>
3 years agochore: swap order of placeholders
Gowri [Mon, 8 Feb 2021 07:52:46 +0000 (18:22 +1030)]
chore: swap order of placeholders

3 years agoMerge #7549
bors[bot] [Mon, 8 Feb 2021 04:38:34 +0000 (04:38 +0000)]
Merge #7549

7549:  Documentation: Explain how initial configuration is sent over LSP and document vim-lsp r=ilya-bobyr a=ilya-bobyr

This request contains two related but independent changes.
The first explains `rust-analyzer` initial configuration over LSP.
The second - adds documentation on `vim-lsp` Vim plugin and provides an example of the initial configuration for `rust-analyzer` when using this particular LSP client.

Let me know if you would prefer the changes to be reviewed in two separate pull requests.

Co-authored-by: Ilya Bobyr <ilya.bobyr@gmail.com>
3 years agoVim docs: vim-lsp with initial configuration.
Ilya Bobyr [Thu, 4 Feb 2021 02:49:59 +0000 (18:49 -0800)]
Vim docs: vim-lsp with initial configuration.

`vim-lsp` is another popular LSP client for Vim.  And, as there is no
`rust-analyzer` specific UI, it is non-trivial to figure out how the
initial configuration is performed.

3 years agoExplain how initial configuration is sent over LSP.
Ilya Bobyr [Thu, 4 Feb 2021 02:33:19 +0000 (18:33 -0800)]
Explain how initial configuration is sent over LSP.

3 years agoci: update relevant test case expected values
Gowri [Sun, 7 Feb 2021 23:46:20 +0000 (10:16 +1030)]
ci: update relevant test case expected values

3 years agofix: add for keyword in completion #7588
Gowri [Sun, 7 Feb 2021 23:27:16 +0000 (09:57 +1030)]
fix: add for keyword in completion #7588

3 years agofix errors
Sahandevs [Sun, 7 Feb 2021 18:36:16 +0000 (22:06 +0330)]
fix errors

3 years agoformat
Sahandevs [Sun, 7 Feb 2021 18:29:06 +0000 (21:59 +0330)]
format

3 years agohandle Thenable type rejects
Sahandevs [Sun, 7 Feb 2021 18:22:32 +0000 (21:52 +0330)]
handle Thenable type rejects

3 years agohandle promise catches
Sahandevs [Sun, 7 Feb 2021 17:57:21 +0000 (21:27 +0330)]
handle promise catches

3 years agoadd no-floating-promises rule
Sahandevs [Sun, 7 Feb 2021 17:48:15 +0000 (21:18 +0330)]
add no-floating-promises rule

3 years agoremove unnecessary
Sahandevs [Sun, 7 Feb 2021 17:45:13 +0000 (21:15 +0330)]
remove unnecessary

3 years agoMerge #7587
bors[bot] [Sun, 7 Feb 2021 11:15:26 +0000 (11:15 +0000)]
Merge #7587

7587: AdtDef -> Adt r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdtDef -> Adt
Aleksey Kladov [Sun, 7 Feb 2021 11:15:02 +0000 (14:15 +0300)]
AdtDef -> Adt