]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoMerge #7876
bors[bot] [Fri, 5 Mar 2021 08:52:07 +0000 (08:52 +0000)]
Merge #7876

7876: Cleanup install command r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoCleanup install command
Aleksey Kladov [Fri, 5 Mar 2021 08:51:32 +0000 (11:51 +0300)]
Cleanup install command

3 years agoFix regression where the client was not installed
Aleksey Kladov [Fri, 5 Mar 2021 08:12:40 +0000 (11:12 +0300)]
Fix regression where the client was not installed

3 years agoMerge #7868
bors[bot] [Thu, 4 Mar 2021 12:39:36 +0000 (12:39 +0000)]
Merge #7868

7868: Migrate to user-centric config name for `cargo check` stuff r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoMigrate to user-centric config name for `cargo check` stuff
Aleksey Kladov [Thu, 4 Mar 2021 11:52:36 +0000 (14:52 +0300)]
Migrate to user-centric config name for `cargo check` stuff

3 years agoMerge #7866
bors[bot] [Wed, 3 Mar 2021 22:05:38 +0000 (22:05 +0000)]
Merge #7866

7866: Complete `while let` r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoComplete `while let`
Lukas Wirth [Wed, 3 Mar 2021 20:59:41 +0000 (21:59 +0100)]
Complete `while let`

3 years agoDon't complete `super` unless its valid in paths
Lukas Wirth [Wed, 3 Mar 2021 20:58:48 +0000 (21:58 +0100)]
Don't complete `super` unless its valid in paths

3 years agoMerge #7863
bors[bot] [Wed, 3 Mar 2021 18:49:43 +0000 (18:49 +0000)]
Merge #7863

7863: Prevent renaming SelfType and BuiltinType r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoPrevent renaming SelfType and BuiltinType
Lukas Wirth [Wed, 3 Mar 2021 18:48:53 +0000 (19:48 +0100)]
Prevent renaming SelfType and BuiltinType

3 years agoReorder functions in rename.rs
Lukas Wirth [Wed, 3 Mar 2021 17:23:38 +0000 (18:23 +0100)]
Reorder functions in rename.rs

3 years agoMerge #7862
bors[bot] [Wed, 3 Mar 2021 18:11:56 +0000 (18:11 +0000)]
Merge #7862

7862: Remove incorrect broken test r=jonas-schievink a=jonas-schievink

`Struct` cannot be named at all in that position, since `super` doesn't
resolve to the block scope

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove incorrect broken test
Jonas Schievink [Wed, 3 Mar 2021 18:10:56 +0000 (19:10 +0100)]
Remove incorrect broken test

`Struct` cannot be named at all in that position, since `super` doesn't
resolve to the block scope

3 years agoMerge #7861
bors[bot] [Wed, 3 Mar 2021 13:29:56 +0000 (13:29 +0000)]
Merge #7861

7861: Special-case parenthesized and negated expressions in demorgan assist r=lnicola a=Jesse-Bakker

Fixes #7831

Co-authored-by: Jesse Bakker <github@jessebakker.com>
3 years agoSpecial-case parenthesized and negated expressions in demorgan assist
Jesse Bakker [Wed, 3 Mar 2021 12:12:00 +0000 (13:12 +0100)]
Special-case parenthesized and negated expressions in demorgan assist

3 years agoMerge #7858
bors[bot] [Wed, 3 Mar 2021 08:23:38 +0000 (08:23 +0000)]
Merge #7858

7858: Clarify comparison rule r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoClarify comparison rule
Aleksey Kladov [Wed, 3 Mar 2021 08:23:05 +0000 (11:23 +0300)]
Clarify comparison rule

3 years agoMerge #7853
bors[bot] [Tue, 2 Mar 2021 20:34:24 +0000 (20:34 +0000)]
Merge #7853

7853: Update lexer r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoUpdate lexer
kjeremy [Tue, 2 Mar 2021 20:33:22 +0000 (15:33 -0500)]
Update lexer

3 years agoMerge #7852
bors[bot] [Tue, 2 Mar 2021 17:42:20 +0000 (17:42 +0000)]
Merge #7852

7852: bump once_cell r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agobump once_cell
kjeremy [Tue, 2 Mar 2021 17:41:20 +0000 (12:41 -0500)]
bump once_cell

3 years agoMerge #7851
bors[bot] [Tue, 2 Mar 2021 15:46:02 +0000 (15:46 +0000)]
Merge #7851

7851: Compress tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoCompress tests
Aleksey Kladov [Tue, 2 Mar 2021 13:38:51 +0000 (16:38 +0300)]
Compress tests

3 years agoMerge #7824
bors[bot] [Tue, 2 Mar 2021 15:28:41 +0000 (15:28 +0000)]
Merge #7824

7824: feat: add type ascription r=matklad a=conradludgate

Based on this conversation: https://twitter.com/rust_analyzer/status/1366092401278922757
Built off of `add_turbo_fish`, finds the current `let` statement, checks if it has type/turbofish already and checks if the rhs function is generic.

There's one case I couldn't figure out how to implement that would be nice:

```rust
#[test]
fn add_type_ascription_function_result() {
    check_assist(
        add_type_ascription,
        r#"
fn make<T>() -> Result<T, &'static str> {}
fn main() {
    let x = make()$0;
}
"#,
        r#"
fn make<T>() -> Result<T, &'static str> {}
fn main() {
    let x: Result<${0:_}, &'static str> = make();
}
"#,
    );
}
```

The `Function::ret_type` fn wasn't returning anything much useful so I'm not sure how to identity such scenarios just yet

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
3 years agochore: remove redundant tests
Conrad Ludgate [Tue, 2 Mar 2021 15:26:36 +0000 (15:26 +0000)]
chore: remove redundant tests

3 years agochore: remove deleted file path
Conrad Ludgate [Tue, 2 Mar 2021 15:02:47 +0000 (15:02 +0000)]
chore: remove deleted file path

3 years agochore: codegen
Conrad Ludgate [Tue, 2 Mar 2021 14:55:37 +0000 (14:55 +0000)]
chore: codegen

3 years agorefactor: re-use add_turbo_fish function
Conrad Ludgate [Tue, 2 Mar 2021 14:28:53 +0000 (14:28 +0000)]
refactor: re-use add_turbo_fish function

3 years agochore: fmt + docs
Conrad Ludgate [Mon, 1 Mar 2021 11:51:52 +0000 (11:51 +0000)]
chore: fmt + docs

3 years agochore: rename var
Conrad Ludgate [Mon, 1 Mar 2021 11:21:02 +0000 (11:21 +0000)]
chore: rename var

3 years agofeat: add type ascription assist
Conrad Ludgate [Mon, 1 Mar 2021 10:51:47 +0000 (10:51 +0000)]
feat: add type ascription assist

3 years agoMerge #7850
bors[bot] [Tue, 2 Mar 2021 14:19:45 +0000 (14:19 +0000)]
Merge #7850

7850: Don't add space when joining line to opening quote r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoDon't add space when joining line to opening quote
Aleksey Kladov [Tue, 2 Mar 2021 13:48:54 +0000 (16:48 +0300)]
Don't add space when joining line to opening quote

3 years agoMerge #7849
bors[bot] [Tue, 2 Mar 2021 13:54:56 +0000 (13:54 +0000)]
Merge #7849

7849: Fix xflags fallout r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoFix xflags fallout
Aleksey Kladov [Tue, 2 Mar 2021 13:50:03 +0000 (16:50 +0300)]
Fix xflags fallout

https://github.com/rust-analyzer/rust-analyzer/pull/7847#issuecomment-788920830

3 years agoMerge #7795
bors[bot] [Tue, 2 Mar 2021 13:46:50 +0000 (13:46 +0000)]
Merge #7795

7795: Show docs on hover for keywords and primitives r=matklad a=Veykril

![lAWFadkziX](https://user-images.githubusercontent.com/3757771/109369534-eeb4f500-789c-11eb-8f2b-2f9c4e129de3.gif)

It's a bit annoying that this requires the `SyntaxNode` and `Semantics` to be pulled through `hover_for_definition` just so we can get the `std` crate but I couldn't think of a better way.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoShow docs on hover for keywords and primitives
Lukas Wirth [Tue, 2 Mar 2021 13:41:01 +0000 (14:41 +0100)]
Show docs on hover for keywords and primitives

3 years agoMerge #7335 #7691
bors[bot] [Tue, 2 Mar 2021 13:32:06 +0000 (13:32 +0000)]
Merge #7335 #7691

7335: added region folding r=matklad a=LucianoBestia

Regions of code that you'd like to be folded can be wrapped with  `// #region` and `// #endregion` line comments.
This is called "Region Folding". It is originally available for many languages in VSCode. But Rust-analyzer has its own folding function and this is missing.
With this Pull Request I am suggesting a simple solution.
The regions are a special kind of comments, so I added a bit of code in the comment folding function.
The regex to match are: `^\s*//\s*#?region\b` and `^\s*//\s*#?endregion\b`.
The number of space characters is not important. There is an optional # character. The line can end with a name of the region.
Example:
```rust
// 1. some normal comment
// region: test
// 2. some normal comment
calling_function(x,y);
// endregion: test
```
I added a test for this new functionality in `folding_ranges.rs`.
Please, take a look and comment.
I found that these exact regexes are already present in the file `language-configuration.json`, but I don't find a way to read this configuration. So my regex is hardcoded in the code.

7691: Suggest name in extract variable r=matklad a=cpud36

Generate better default name in extract variable assist as was mentioned in issue #1587

# Currently supported
(in order of declining precedence)
1. Expr is argument to a function; use corresponding parameter name
2. Expr is result of a function or method call; use this function/method's name
3. Use expr type name (if possible)
4. Fallback to `var_name` otherwise

# Showcase

![generate_derive_variable_name_from_method](https://user-images.githubusercontent.com/4218373/108013304-72105400-701c-11eb-9f13-eec52e74d0cc.gif)
![generate_derive_variable_name_from_param](https://user-images.githubusercontent.com/4218373/108013305-72a8ea80-701c-11eb-957e-2214f7f005de.gif)

# Questions

* Should we more aggressively strip known types? E.g. we already strip `&T -> T`; should we strip `Option<T> -> T`, `Result<T, E> -> T`, and others?
* Integers and floats use `var_name` by default. Should we introduce a name, like `i`, `f` etc?
* Can we return a list and suggest a name when renaming(like IntelliJ does)?
* Should we add counters to remove duplicate variables? E.g. `type`, `type1`, type2`, etc.

Co-authored-by: Luciano Bestia <LucianoBestia@gmail.com>
Co-authored-by: Luciano <31509965+LucianoBestia@users.noreply.github.com>
Co-authored-by: Vladyslav Katasonov <cpud47@gmail.com>
3 years agostrip useless methods, and unary ops in suggest_name
Vladyslav Katasonov [Tue, 16 Feb 2021 21:42:58 +0000 (00:42 +0300)]
strip useless methods, and unary ops in suggest_name

3 years agopull out suggest_name::* to utils; enchance heuristics
Vladyslav Katasonov [Tue, 16 Feb 2021 20:48:15 +0000 (23:48 +0300)]
pull out suggest_name::* to utils; enchance heuristics

3 years agosuggest parameter name before function name
Vladyslav Katasonov [Tue, 16 Feb 2021 02:55:47 +0000 (05:55 +0300)]
suggest parameter name before function name

3 years agotry to suggest name when extracting variable
Vladyslav Katasonov [Tue, 16 Feb 2021 01:43:32 +0000 (04:43 +0300)]
try to suggest name when extracting variable

3 years agoMerge #7513
bors[bot] [Tue, 2 Mar 2021 13:20:47 +0000 (13:20 +0000)]
Merge #7513

7513: NFA parser for mbe matcher r=matklad a=edwin0cheng

Almost straight porting from rustc one, but a little bit slow :(

```
rust-analyzer analysis-stats -q .
```

From:
```log
Database loaded:     636.11ms, 277minstr
  crates: 36, mods: 594, decls: 11527, fns: 9017
Item Collection:     10.99s, 60ginstr
  exprs: 249618, ??ty: 2699 (1%), ?ty: 2101 (0%), !ty: 932
Inference:           28.94s, 123ginstr
Total:               39.93s, 184ginstr
```

To:
```log
Database loaded:     630.90ms, 277minstr
  crates: 36, mods: 594, decls: 11528, fns: 9018
Item Collection:     13.70s, 77ginstr
  exprs: 249482, ??ty: 2699 (1%), ?ty: 2101 (0%), !ty: 932
Inference:           30.27s, 133ginstr
Total:               43.97s, 211ginstr
```

Fixes #4777

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoMerge #7848
bors[bot] [Tue, 2 Mar 2021 12:31:15 +0000 (12:31 +0000)]
Merge #7848

7848: Bump cargo_metadata r=matklad a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoBump cargo_metadata
Laurențiu Nicola [Tue, 2 Mar 2021 12:27:29 +0000 (14:27 +0200)]
Bump cargo_metadata

3 years agoMerge #7837
bors[bot] [Tue, 2 Mar 2021 12:19:50 +0000 (12:19 +0000)]
Merge #7837

7837: Add more information to VSCode extenstion README r=matklad a=IceSentry

A lot of these are duplicated from the documentation or main README. While it's unfortunate to have duplicated information, the current VSCode page is very barebones and doesn't offer much confidence.

This updated README offers a few more links and follows a structure similar to the official rust extension and other popular vscode extensions. The additions are, as much as possible specific to the vscode extension and not rust-analyzer as a LSP.

The note about not using the official extension is also right there at the top because that's a common issue people have when trying it out.

I added the sponsor section since it's common in other extensions README, but I'm not sure if it's necessary

Co-authored-by: Charles Giguere <IceSentry@users.noreply.github.com>
Co-authored-by: cgiguere <c.giguere42@gmail.com>
3 years agoMerge #7847
bors[bot] [Tue, 2 Mar 2021 12:09:51 +0000 (12:09 +0000)]
Merge #7847

7847: Switch from pico-args to xflags r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoSwitch from pico-args to xflags
Aleksey Kladov [Tue, 2 Mar 2021 12:01:48 +0000 (15:01 +0300)]
Switch from pico-args to xflags

3 years agoMerge #7836
bors[bot] [Tue, 2 Mar 2021 08:38:25 +0000 (08:38 +0000)]
Merge #7836

7836: Check for path dev-dependencies with a version number r=lnicola a=lnicola

Closes https://github.com/rust-analyzer/rust-analyzer/pull/7828#issuecomment-788174522.

This looks a bit ugly, but at least fixes an issues where we missed target-specific dependencies.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoMerge #7777
bors[bot] [Tue, 2 Mar 2021 08:04:38 +0000 (08:04 +0000)]
Merge #7777

7777: Implement line<->block comment assist r=Veykril a=djrenren

Fixes: https://github.com/rust-analyzer/rust-analyzer/issues/6515
Co-authored-by: John Renner <john@jrenner.net>
3 years agoMerge #7844
bors[bot] [Tue, 2 Mar 2021 05:20:32 +0000 (05:20 +0000)]
Merge #7844

7844: Fix ProcMacroClient dropped too early in cli r=edwin0cheng a=edwin0cheng

Fix #7843

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoFix ProcMacroClient dropped too early in cli
Edwin Cheng [Tue, 2 Mar 2021 05:14:05 +0000 (13:14 +0800)]
Fix ProcMacroClient dropped too early in cli

3 years agoMerge #7827
bors[bot] [Tue, 2 Mar 2021 00:01:14 +0000 (00:01 +0000)]
Merge #7827

7827: Fix proc macro TokenStream::from_str token ids r=vlad20012 a=vlad20012

To be honest, I don't know what it changes from a user perspective.

Internally, this fixes spans (token ids) of a `TokenStream` parsed from a string:

```rust
#[proc_macro_derive(FooDerive)]
pub fn foo_derive(item: TokenStream) -> TokenStream {
    "fn foo() {}".parse().unwrap()
}
```

Previously, `TokenStream` was constructed from tokens with incremental ids (that conflicted with call-site tokens). Now they are `-1`.

Co-authored-by: vlad20012 <beskvlad@gmail.com>
3 years agoclean uo rustup link
cgiguere [Mon, 1 Mar 2021 20:19:30 +0000 (15:19 -0500)]
clean uo rustup link

3 years agoadd sponsor links
cgiguere [Mon, 1 Mar 2021 20:07:36 +0000 (15:07 -0500)]
add sponsor links

3 years agoMerge #7835
bors[bot] [Mon, 1 Mar 2021 19:57:25 +0000 (19:57 +0000)]
Merge #7835

7835: Use cli parser with auto-generated help r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAdd more information to VSCode extenstion README
Charles Giguere [Mon, 1 Mar 2021 19:47:54 +0000 (14:47 -0500)]
Add more information to VSCode extenstion README

A lot of these are duplicated from the documentation or main README. While it's unfortunate to have duplicated information, the current VSCode page is very barebones and doesn't offer much confidence.

This updated README offers a few more links and follows a structure similar to the official rust extension and other popular vscode extensions. The additions are, as much as possible specific to the vscode extension and not rust-analyzer as a LSP.

The note about not using the official extension is also right there at the top because that's a common issue people have when trying it out.

I added the sponsor section since it's common in other extensions README, but I'm not sure if it's necessary

3 years agoApply edits
John Renner [Mon, 1 Mar 2021 19:41:22 +0000 (11:41 -0800)]
Apply edits

3 years agoMerge #7829 #7833
bors[bot] [Mon, 1 Mar 2021 19:31:01 +0000 (19:31 +0000)]
Merge #7829 #7833

7829: Bump deps r=matklad a=lnicola

Unfortunately, this brings a bunch of proc macros dep because `cargo-metadata` went full-in on `derive-builder`. I'm not sure what we can do here..

7833: Use chalk_ir::Mutability r=Veykril a=Veykril

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUpdate xtask/src/flags.rs
Aleksey Kladov [Mon, 1 Mar 2021 19:29:17 +0000 (22:29 +0300)]
Update xtask/src/flags.rs

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agoCheck for path dev-dependencies with a version number
Laurențiu Nicola [Mon, 1 Mar 2021 19:13:16 +0000 (21:13 +0200)]
Check for path dev-dependencies with a version number

3 years agoUse cli parser with auto-generated help
Aleksey Kladov [Mon, 1 Mar 2021 18:12:44 +0000 (21:12 +0300)]
Use cli parser with auto-generated help

3 years agoUse chalk_ir::Mutability
Lukas Wirth [Mon, 1 Mar 2021 18:30:34 +0000 (19:30 +0100)]
Use chalk_ir::Mutability

3 years agoMerge #7834
bors[bot] [Mon, 1 Mar 2021 18:52:39 +0000 (18:52 +0000)]
Merge #7834

7834: Fix `find_path` when inner items are present r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7750 (but adds a bunch of FIXMEs, because a lot of this code is still wrong in the presence of inner items)

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix `find_path` when inner items are present
Jonas Schievink [Mon, 1 Mar 2021 18:36:34 +0000 (19:36 +0100)]
Fix `find_path` when inner items are present

3 years agoMerge #7832
bors[bot] [Mon, 1 Mar 2021 18:30:46 +0000 (18:30 +0000)]
Merge #7832

7832: Axe pre-commit r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoAxe pre-commit
Aleksey Kladov [Mon, 1 Mar 2021 18:29:40 +0000 (21:29 +0300)]
Axe pre-commit

3 years agoMerge #7830
bors[bot] [Mon, 1 Mar 2021 17:51:35 +0000 (17:51 +0000)]
Merge #7830

7830: Simplify xtask r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoSimplify xtask
Aleksey Kladov [Mon, 1 Mar 2021 17:16:23 +0000 (20:16 +0300)]
Simplify xtask

lib/bin/test separation isn't really needed.

3 years agoFix proc macro TokenStream::from_str token ids
vlad20012 [Mon, 1 Mar 2021 13:31:03 +0000 (16:31 +0300)]
Fix proc macro TokenStream::from_str token ids

3 years agoMerge #7828
bors[bot] [Mon, 1 Mar 2021 16:18:08 +0000 (16:18 +0000)]
Merge #7828

7828: Use an unversioned profile dependency in mbe r=edwin0cheng a=lnicola

Apparently, dev dependencies shouldn't be versioned. This hopefully fixes publishing to crates.io.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoBump chalk
Laurențiu Nicola [Mon, 1 Mar 2021 16:17:03 +0000 (18:17 +0200)]
Bump chalk

3 years agoBump deps
Laurențiu Nicola [Mon, 1 Mar 2021 16:13:08 +0000 (18:13 +0200)]
Bump deps

3 years agoUse an unversioned profile dependency in mbe
Laurențiu Nicola [Mon, 1 Mar 2021 16:11:06 +0000 (18:11 +0200)]
Use an unversioned profile dependency in mbe

3 years agoMerge #7778
bors[bot] [Mon, 1 Mar 2021 14:50:58 +0000 (14:50 +0000)]
Merge #7778

7778: Fix lowering trailing self paths in UseTrees r=Veykril a=Veykril

Noticed that hovering over `self` in a use tree like `use foo::bar::{self}` showing documentation and such for the current module instead of `bar`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #7826
bors[bot] [Mon, 1 Mar 2021 13:29:54 +0000 (13:29 +0000)]
Merge #7826

7826: Introduce Ty::Alias r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoIntroduce Ty::Alias
Lukas Wirth [Mon, 1 Mar 2021 13:24:00 +0000 (14:24 +0100)]
Introduce Ty::Alias

3 years agoMerge #7823
bors[bot] [Mon, 1 Mar 2021 12:57:26 +0000 (12:57 +0000)]
Merge #7823

7823: Being Ty::InferenceVar closer to chalk equivalent r=flodiebold a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAssert index relationship between type_variable_table and var_unification_table
Lukas Wirth [Mon, 1 Mar 2021 12:54:17 +0000 (13:54 +0100)]
Assert index relationship between type_variable_table and var_unification_table

3 years agoBeing Ty::InferenceVar closes to chalk equivalent
Lukas Wirth [Mon, 1 Mar 2021 11:35:11 +0000 (12:35 +0100)]
Being Ty::InferenceVar closes to chalk equivalent

3 years agoMerge #7822
bors[bot] [Mon, 1 Mar 2021 11:29:47 +0000 (11:29 +0000)]
Merge #7822

7822: Paperover a bug in cargo-workspace for publish RA r=lnicola a=edwin0cheng

r? @lnicola

See also https://github.com/pksunkara/cargo-workspaces/issues/39

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3 years agoPaperover a bug in cargo-workspace for publish RA
Edwin Cheng [Mon, 1 Mar 2021 11:23:45 +0000 (19:23 +0800)]
Paperover a bug in cargo-workspace for publish RA

3 years agoMerge #7819 #7820
bors[bot] [Mon, 1 Mar 2021 11:15:19 +0000 (11:15 +0000)]
Merge #7819 #7820

7819: Speedup heavy tests r=matklad a=matklad

bors r+
🤖

7820: Update vscode README with a small features list r=matklad a=Veykril

Nothing grande but I figured this is a bit better than showing almost nothing

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoUpdate vscode README with a small features list
Lukas Wirth [Mon, 1 Mar 2021 10:07:15 +0000 (11:07 +0100)]
Update vscode README with a small features list

3 years agoSpeedup heavy tests
Aleksey Kladov [Mon, 1 Mar 2021 09:14:16 +0000 (12:14 +0300)]
Speedup heavy tests

We used to skip sysroot, but this logic got bitrotted, reinstalling.

3 years agoMerge #7818
bors[bot] [Mon, 1 Mar 2021 08:55:03 +0000 (08:55 +0000)]
Merge #7818

7818: Clean up warnings r=matklad a=bugadani

Co-authored-by: Dániel Buga <bugadani@gmail.com>
3 years agoClean up unused field warning
Dániel Buga [Mon, 1 Mar 2021 08:12:42 +0000 (09:12 +0100)]
Clean up unused field warning

3 years agoRemove redundant semicolon
Dániel Buga [Mon, 1 Mar 2021 08:05:14 +0000 (09:05 +0100)]
Remove redundant semicolon

3 years agoMerge #7816
bors[bot] [Sun, 28 Feb 2021 22:54:07 +0000 (22:54 +0000)]
Merge #7816

7816: Lift Ty::Fn into a struct r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoLift FnPointer into a struct
Lukas Wirth [Sun, 28 Feb 2021 21:12:07 +0000 (22:12 +0100)]
Lift FnPointer into a struct

3 years agoFix lowering trailing self paths in UseTrees
Lukas Wirth [Wed, 24 Feb 2021 22:37:08 +0000 (23:37 +0100)]
Fix lowering trailing self paths in UseTrees

3 years agoMerge #7815
bors[bot] [Sun, 28 Feb 2021 22:24:21 +0000 (22:24 +0000)]
Merge #7815

7815: hir_ty: use default type generic for box expressions r=cynecx a=cynecx

r? @flodiebold

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6837 according to https://github.com/rust-analyzer/rust-analyzer/issues/6837#issuecomment-787456488.

Co-authored-by: cynecx <me@cynecx.net>
3 years agohir_ty: use default type generic for box expressions
cynecx [Sun, 28 Feb 2021 20:15:26 +0000 (21:15 +0100)]
hir_ty: use default type generic for box expressions

3 years agoMerge #7814
bors[bot] [Sun, 28 Feb 2021 19:56:16 +0000 (19:56 +0000)]
Merge #7814

7814: Turn Ty::Tuple variant into a tuple-variant r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoRemove Substs from Ty::ForeignType
Lukas Wirth [Sun, 28 Feb 2021 19:44:09 +0000 (20:44 +0100)]
Remove Substs from Ty::ForeignType

3 years agoTurn Ty::Tuple variant into a tuple-variant
Lukas Wirth [Sun, 28 Feb 2021 19:39:43 +0000 (20:39 +0100)]
Turn Ty::Tuple variant into a tuple-variant

3 years agoMerge #7813
bors[bot] [Sun, 28 Feb 2021 19:16:51 +0000 (19:16 +0000)]
Merge #7813

7813: Inline TypeCtor into Ty r=flodiebold a=Veykril

This removes the `ApplicationTy` variant from `Ty` bringing the representation a lot closer to chalk's `TyKind`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix code_model::Type::walk not walking all types
Lukas Wirth [Sun, 28 Feb 2021 18:46:59 +0000 (19:46 +0100)]
Fix code_model::Type::walk not walking all types

3 years agoMerge #7812
bors[bot] [Sun, 28 Feb 2021 18:14:53 +0000 (18:14 +0000)]
Merge #7812

7812: Use consistent naming for assist r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agoUse consistent naming for assist
Aleksey Kladov [Sun, 28 Feb 2021 18:11:41 +0000 (21:11 +0300)]
Use consistent naming for assist