]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agofix: client distribution string replacement looking for wrong key
Lukas Wirth [Tue, 8 Mar 2022 01:32:35 +0000 (02:32 +0100)]
fix: client distribution string replacement looking for wrong key

2 years agoMerge #11647
bors[bot] [Mon, 7 Mar 2022 17:19:43 +0000 (17:19 +0000)]
Merge #11647

11647: Improve inlay hint padding r=lnicola a=lnicola

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoImprove inlay hint padding
Laurențiu Nicola [Mon, 7 Mar 2022 17:18:36 +0000 (19:18 +0200)]
Improve inlay hint padding

2 years agoMerge #11445
bors[bot] [Mon, 7 Mar 2022 16:49:12 +0000 (16:49 +0000)]
Merge #11445

11445: Upstream inlay hints r=lnicola a=lnicola

Closes https://github.com/rust-analyzer/rust-analyzer/issues/2797
Closes https://github.com/rust-analyzer/rust-analyzer/issues/3394 (since now resolve the hints for the range given only, not for the whole document. We don't actually resolve anything due to [hard requirement](https://github.com/rust-analyzer/rust-analyzer/pull/11445#issuecomment-1035227434) on label being immutable. Any further heavy actions could go to the `resolve` method that's now available via the official Code API for hints)

Based on `@SomeoneToIgnore's` branch, with a couple of updates:

 - I squashed, more or less successfully, the commits on that branch
 - downloading the `.d.ts` no longer works, but you can get it manually from https://raw.githubusercontent.com/microsoft/vscode/release/1.64/src/vscode-dts/vscode.proposed.inlayHints.d.ts
 - you might need to pass `--enable-proposed-api matklad.rust-analyzer`
 - if I'm reading the definition right, `InlayHintKind` needs to be serialized as a number, not string
 - this doesn't work anyway -- the client-side gets the hints, but they don't display

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoAdd inlayHints cap
Laurențiu Nicola [Mon, 7 Mar 2022 16:48:27 +0000 (18:48 +0200)]
Add inlayHints cap

2 years agoAdd missing parameter
Laurențiu Nicola [Mon, 7 Mar 2022 13:42:20 +0000 (15:42 +0200)]
Add missing parameter

2 years agoFix parameter hint position
Laurențiu Nicola [Mon, 7 Mar 2022 13:24:54 +0000 (15:24 +0200)]
Fix parameter hint position

2 years agoBump esbuild
Laurențiu Nicola [Mon, 7 Mar 2022 13:22:13 +0000 (15:22 +0200)]
Bump esbuild

2 years agoUpdate LSP docs
Laurențiu Nicola [Fri, 4 Mar 2022 06:26:44 +0000 (08:26 +0200)]
Update LSP docs

2 years agoMerge #11645
bors[bot] [Mon, 7 Mar 2022 11:24:52 +0000 (11:24 +0000)]
Merge #11645

11645: Update manual.adoc r=lnicola a=vi

Resolves #11507

Co-authored-by: Vitaly Shukela <vi0oss@gmail.com>
2 years agoUpdate manual.adoc
Vitaly Shukela [Mon, 7 Mar 2022 11:22:07 +0000 (14:22 +0300)]
Update manual.adoc

Resolves #11507

2 years agoMerge #11644
bors[bot] [Mon, 7 Mar 2022 10:05:31 +0000 (10:05 +0000)]
Merge #11644

11644: Emit more detailed highlighting for `%`, `>>`, `<<` r=Veykril a=arzg

These are currently just given `operator`, when `%` can be grouped under `arithmetic`, and `>>` and `<<` can be grouped under `bitwise`.

Co-authored-by: Luna Razzaghipour <aramisnoah@gmail.com>
2 years agoEmit more detailed highlighting for `%`, `>>`, `<<`
Luna Razzaghipour [Mon, 7 Mar 2022 09:16:03 +0000 (20:16 +1100)]
Emit more detailed highlighting for `%`, `>>`, `<<`

2 years agoMerge #11639
bors[bot] [Sun, 6 Mar 2022 18:31:30 +0000 (18:31 +0000)]
Merge #11639

11639: internal: Re-arrange ide_db modules r=Veykril a=Veykril

Thins out the `helpers` module by giving some items more appropriate places to live
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoUpdate tidy ignore list
Lukas Wirth [Sun, 6 Mar 2022 18:11:05 +0000 (19:11 +0100)]
Update tidy ignore list

2 years agointernal: Re-arrange ide_db modules
Lukas Wirth [Sun, 6 Mar 2022 18:01:30 +0000 (19:01 +0100)]
internal: Re-arrange ide_db modules

2 years agoMerge #11637
bors[bot] [Sun, 6 Mar 2022 16:56:29 +0000 (16:56 +0000)]
Merge #11637

11637: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agominor: Simplify
Lukas Wirth [Sun, 6 Mar 2022 16:56:02 +0000 (17:56 +0100)]
minor: Simplify

2 years agoMerge #11633
bors[bot] [Sun, 6 Mar 2022 12:22:35 +0000 (12:22 +0000)]
Merge #11633

11633: Automatically change text color in logo based on dark mode r=Veykril a=arzg

Currently the black text in the logo in the README just has a white stroke so it’s readable in dark mode. This PR adds automatic detection of whether the user is using system dark mode, and if they are changes the text colour to white and removes the stroke.

Before:

<img width="910" alt="Screen Shot 2022-03-06 at 10 54 35 pm" src="https://user-images.githubusercontent.com/31783266/156921920-7ac88aa4-bab6-44c2-be37-30338a2d9ec9.png">

After (now in Chrome because this doesn’t seem to work in Safari):

<img width="822" alt="Screen Shot 2022-03-06 at 11 10 12 pm" src="https://user-images.githubusercontent.com/31783266/156922615-41fe63e0-7901-4cb1-a229-6d37b6e4369a.png">
<img width="820" alt="Screen Shot 2022-03-06 at 11 10 25 pm" src="https://user-images.githubusercontent.com/31783266/156922619-1bdd5b9c-89ac-4fe1-bf17-1a1ac4ead805.png">

Co-authored-by: Luna Razzaghipour <aramisnoah@gmail.com>
2 years agoAutomatically change text color in logo based on dark mode
Luna Razzaghipour [Sun, 6 Mar 2022 11:53:52 +0000 (22:53 +1100)]
Automatically change text color in logo based on dark mode

2 years agoMerge #11632
bors[bot] [Sun, 6 Mar 2022 08:44:54 +0000 (08:44 +0000)]
Merge #11632

11632: Bring back syntax highlighting in test data r=matklad a=matklad

cc #11597

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agoBring back syntax highlighting in test data
Aleksey Kladov [Sun, 6 Mar 2022 08:42:17 +0000 (08:42 +0000)]
Bring back syntax highlighting in test data

cc #11597

2 years agoMerge #11631
bors[bot] [Sun, 6 Mar 2022 03:19:54 +0000 (03:19 +0000)]
Merge #11631

11631: internal: Refactor syntax_highlighting r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agointernal: Simplify and optimize syntax_highlighting
Lukas Wirth [Sun, 6 Mar 2022 02:49:54 +0000 (03:49 +0100)]
internal: Simplify and optimize syntax_highlighting

2 years agoMerge #11630
bors[bot] [Sat, 5 Mar 2022 23:48:54 +0000 (23:48 +0000)]
Merge #11630

11630: fix: Recognize `Self` as a proper keyword r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoAdd a macro case for the keyword highlighting test fixture
Lukas Wirth [Sat, 5 Mar 2022 23:26:15 +0000 (00:26 +0100)]
Add a macro case for the keyword highlighting test fixture

2 years agoFix extern crate self having self unresolved
Lukas Wirth [Sat, 5 Mar 2022 23:17:40 +0000 (00:17 +0100)]
Fix extern crate self having self unresolved

2 years agoHighlight `Self` as a keyword by default
Lukas Wirth [Sat, 5 Mar 2022 23:12:10 +0000 (00:12 +0100)]
Highlight `Self` as a keyword by default

2 years agoSimplify
Lukas Wirth [Sat, 5 Mar 2022 22:53:24 +0000 (23:53 +0100)]
Simplify

2 years agoFix hover for `Self` keyword
Lukas Wirth [Sat, 5 Mar 2022 22:47:44 +0000 (23:47 +0100)]
Fix hover for `Self` keyword

2 years agoMerge #11629
bors[bot] [Sat, 5 Mar 2022 22:34:59 +0000 (22:34 +0000)]
Merge #11629

11629: fix: Fix macro-calls expanding to items in if/while conditions r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix highlighting of `Self`
Lukas Wirth [Sat, 5 Mar 2022 22:34:37 +0000 (23:34 +0100)]
Fix highlighting of `Self`

2 years agoFix test fixture
Lukas Wirth [Sat, 5 Mar 2022 21:44:49 +0000 (22:44 +0100)]
Fix test fixture

2 years agofix: Recognize `Self` as a proper keyword
Lukas Wirth [Sat, 5 Mar 2022 22:20:06 +0000 (23:20 +0100)]
fix: Recognize `Self` as a proper keyword

2 years agofix macro-calls always expanding to expressions in LetStmt
Lukas Wirth [Sat, 5 Mar 2022 21:04:06 +0000 (22:04 +0100)]
fix macro-calls always expanding to expressions in LetStmt

2 years agofix: Fix macro-calls expanding to items in if/while conditions
Lukas Wirth [Sat, 5 Mar 2022 20:58:51 +0000 (21:58 +0100)]
fix: Fix macro-calls expanding to items in if/while conditions

2 years agoMerge #11598
bors[bot] [Sat, 5 Mar 2022 11:31:29 +0000 (11:31 +0000)]
Merge #11598

11598: feat: Parse destructuring assignment r=Veykril a=ChayimFriedman2

Part of #11532.

Lowering is not as easy and may not even be feasible right now as it requires generating identifiers: `(a, b) = (b, a)` is desugared into
```rust
{
    let (<gensym_a>, <gensym_b>) = (b, a);
    a = <gensym_a>;
    b = <gensym_b>;
}
```

rustc uses hygiene to implement that, but we don't support hygiene yet.

However, I think parsing was the main problem as lowering will just affect type inference, and while `{unknown}` is not nice it's much better than a syntax error.

I'm still looking for the best way to do lowering, though.

Fixes #11454.

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2 years agoMerge #11574
bors[bot] [Sat, 5 Mar 2022 11:20:05 +0000 (11:20 +0000)]
Merge #11574

11574: Small refactor text edit 2nd r=Veykril a=HansAuger

Some more changes to text_edit. Basic idea is to make `Indel` implement `PartialOrd` to take advantage of some sweet sweet iteration, most notably itertool's `merge`.

Co-authored-by: Moritz Vetter <mv@3yourmind.com>
2 years agoMerge #11623
bors[bot] [Sat, 5 Mar 2022 10:32:07 +0000 (10:32 +0000)]
Merge #11623

11623: fix: Add type variable table to InferenceTableSnapshot r=flodiebold a=tysg

Fixes #11601.

I observed that removing the `rollback` line in https://github.com/rust-analyzer/rust-analyzer/commit/6fc3d3aa4cbf637d748c60cfdbb98b5f6a040576 fixes the issue.

Looking at the stacktrace, I believe not restoring `type_variable_table` causes `type_variable_table` and `var_unification_table` to go out of sync, then when `hir_ty::infer::unify::InferenceTable::new_var` tries to extend `type_variable_table` to be the same length as `var_unification_table`, problems will arise.

However, I cannot pinpoint exactly how or where the vector capacity overflow happens, so my understanding might not be correct after all.

Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
2 years agoAdd type variable table to InferenceTableSnapshot
Tianyi Song [Sat, 5 Mar 2022 09:59:28 +0000 (17:59 +0800)]
Add type variable table to InferenceTableSnapshot

2 years agoMerge #11622
bors[bot] [Fri, 4 Mar 2022 23:20:29 +0000 (23:20 +0000)]
Merge #11622

11622: show variadic args in hover function signature r=Veykril a=euclio

The current behavior is to ignore the ellipsis.

Co-authored-by: Andy Russell <arussell123@gmail.com>
2 years agoshow variadic args in hover function signature
Andy Russell [Fri, 4 Mar 2022 21:24:13 +0000 (16:24 -0500)]
show variadic args in hover function signature

2 years agoMerge #11595
bors[bot] [Fri, 4 Mar 2022 20:21:43 +0000 (20:21 +0000)]
Merge #11595

11595: fix: lower string literals with actual value instead of default r=lnicola a=tysg

Fixes #11582. Some questions below in the code review section.

Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
2 years agoMerge #11620
bors[bot] [Fri, 4 Mar 2022 19:47:39 +0000 (19:47 +0000)]
Merge #11620

11620: feat: Support locals with multiple declaration sites r=Veykril a=Veykril

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

This implements the first approach of https://github.com/rust-analyzer/rust-analyzer/issues/8860#issuecomment-845461773:
> treat every Local as having potentially many sources?

The way this is written does allow changing to a MultiLocal approach instead though, I'll investigate whether that turns out to be better or not.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSimplify
Lukas Wirth [Fri, 4 Mar 2022 19:09:32 +0000 (20:09 +0100)]
Simplify

2 years agoSupport locals with multiple declaration sites
Lukas Wirth [Fri, 4 Mar 2022 18:49:08 +0000 (19:49 +0100)]
Support locals with multiple declaration sites

2 years agoMerge #11140
bors[bot] [Fri, 4 Mar 2022 12:55:07 +0000 (12:55 +0000)]
Merge #11140

11140: Preserve order of generic args r=HKalbasi a=HKalbasi

https://github.com/rust-lang/rust/pull/90207 removed order restriction of generic args, i.e. const generics can now become before of type generics. We need to preserve this order to analyze correctly, and this PR does that.

It also simplifies implementation of const generics a bit IMO.

Implementing default generics the same problem of #7434, we need lower them to body and then evaluate them.

Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
2 years agoResolve only type params in type ns
hkalbasi [Fri, 4 Mar 2022 09:00:53 +0000 (12:30 +0330)]
Resolve only type params in type ns

2 years agoPreserve order of generic args
hkalbasi [Wed, 29 Dec 2021 13:35:59 +0000 (17:05 +0330)]
Preserve order of generic args

2 years agoFix formatting
Laurențiu Nicola [Fri, 4 Mar 2022 06:15:17 +0000 (08:15 +0200)]
Fix formatting

2 years agoDrop hint conversion
Laurențiu Nicola [Fri, 4 Mar 2022 06:08:14 +0000 (08:08 +0200)]
Drop hint conversion

2 years agoBump vscode
Laurențiu Nicola [Fri, 4 Mar 2022 05:48:39 +0000 (07:48 +0200)]
Bump vscode

2 years agoRemove debugging leftovers
Kirill Bulatov [Sat, 12 Feb 2022 06:33:04 +0000 (08:33 +0200)]
Remove debugging leftovers

2 years agoLoad hints for part of the file only
Kirill Bulatov [Fri, 11 Feb 2022 22:48:01 +0000 (00:48 +0200)]
Load hints for part of the file only

2 years agoClean up the redundant hints code and config
Kirill Bulatov [Fri, 11 Feb 2022 23:03:32 +0000 (01:03 +0200)]
Clean up the redundant hints code and config

2 years agoFixes
Laurențiu Nicola [Thu, 10 Feb 2022 10:16:02 +0000 (12:16 +0200)]
Fixes

2 years agoUpdate inlay hints for upstream
Laurențiu Nicola [Wed, 9 Feb 2022 17:14:18 +0000 (19:14 +0200)]
Update inlay hints for upstream

2 years agoAdd log messages
Laurențiu Nicola [Wed, 9 Feb 2022 17:13:17 +0000 (19:13 +0200)]
Add log messages

2 years agoBump deps
Laurențiu Nicola [Wed, 9 Feb 2022 17:13:04 +0000 (19:13 +0200)]
Bump deps

2 years agoAdd experimental VSCode api
Kirill Bulatov [Tue, 9 Feb 2021 10:39:40 +0000 (12:39 +0200)]
Add experimental VSCode api

2 years agoLower string literals with real val, not default
Tianyi Song [Tue, 1 Mar 2022 07:44:53 +0000 (15:44 +0800)]
Lower string literals with real val, not default

2 years agoMerge #11616
bors[bot] [Thu, 3 Mar 2022 22:25:42 +0000 (22:25 +0000)]
Merge #11616

11616: fix: Fix semantic highlighting breaking for lifetimes in macros r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoslightly improve highlighting performance for derive annotated items
Lukas Wirth [Thu, 3 Mar 2022 21:59:34 +0000 (22:59 +0100)]
slightly improve highlighting performance for derive annotated items

2 years agofix: Fix semantic highlighting breaking for lifetimes in macros
Lukas Wirth [Thu, 3 Mar 2022 21:50:43 +0000 (22:50 +0100)]
fix: Fix semantic highlighting breaking for lifetimes in macros

2 years agoMerge #11613
bors[bot] [Thu, 3 Mar 2022 18:59:22 +0000 (18:59 +0000)]
Merge #11613

11613: fix: Add `abort` to safe intrinsics list r=lnicola a=lnicola

Closes #11611

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoAdd abort to safe intrinsics list
Laurențiu Nicola [Thu, 3 Mar 2022 18:58:20 +0000 (20:58 +0200)]
Add abort to safe intrinsics list

2 years agoMerge #11610
bors[bot] [Thu, 3 Mar 2022 17:42:33 +0000 (17:42 +0000)]
Merge #11610

11610: Add a (currently failing) test for #11242 r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2 years agoMerge #11609
bors[bot] [Thu, 3 Mar 2022 17:34:00 +0000 (17:34 +0000)]
Merge #11609

11609: Add another case to the syntax fixup code r=flodiebold a=flodiebold

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2 years agoAdd a (currently failing) test for #11242
Florian Diebold [Thu, 3 Mar 2022 17:32:40 +0000 (18:32 +0100)]
Add a (currently failing) test for #11242

2 years agoAdd another case to the syntax fixup code
Florian Diebold [Thu, 3 Mar 2022 17:29:40 +0000 (18:29 +0100)]
Add another case to the syntax fixup code

2 years agoDo not consider `_` to be an expression for `macro_rules!`
Chayim Refael Friedman [Wed, 2 Mar 2022 01:50:54 +0000 (01:50 +0000)]
Do not consider `_` to be an expression for `macro_rules!`

2 years agoParse destructuring assignment
Chayim Refael Friedman [Thu, 24 Feb 2022 08:49:47 +0000 (08:49 +0000)]
Parse destructuring assignment

The only patterns we should parse are `..` in structs and `_`: the rest are either not supported or already valid expressions.

2 years agoMerge #11593
bors[bot] [Tue, 1 Mar 2022 18:27:04 +0000 (18:27 +0000)]
Merge #11593

11593: Build release binaries on Ubuntu 18.04 r=lnicola a=lnicola

Fixes #11558

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoBuild release binaries on Ubuntu 18.04
Laurențiu Nicola [Tue, 1 Mar 2022 05:24:27 +0000 (07:24 +0200)]
Build release binaries on Ubuntu 18.04

2 years agoMerge #11433
bors[bot] [Mon, 28 Feb 2022 10:15:44 +0000 (10:15 +0000)]
Merge #11433

11433: minor: Add scary warning to `onEnter` r=lnicola a=lnicola

Closes #11432

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoAdd scary warning to onEnter
Laurențiu Nicola [Tue, 8 Feb 2022 06:34:24 +0000 (08:34 +0200)]
Add scary warning to onEnter

2 years agoMerge #11579
bors[bot] [Mon, 28 Feb 2022 09:18:26 +0000 (09:18 +0000)]
Merge #11579

11579: minor: Future-proof against a next edition by using `>=` and not `==` r=lnicola a=ChayimFriedman2

So that we won't have a strange bug when edition 2024 will land.

rustc [also does that](https://github.com/rust-lang/rust/blob/427cf81206d3b6cf41c86c1b9ce113a33f1ce860/compiler/rustc_builtin_macros/src/edition_panic.rs#L84).

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2 years agoFuture-proof against a next edition by using `>=` and not `==`
Chayim Refael Friedman [Mon, 28 Feb 2022 09:13:55 +0000 (11:13 +0200)]
Future-proof against a next edition by using `>=` and not `==`

So that we won't have a strange bug when edition 2024 will land.

rustc [also does that](https://github.com/rust-lang/rust/blob/427cf81206d3b6cf41c86c1b9ce113a33f1ce860/compiler/rustc_builtin_macros/src/edition_panic.rs#L84).

2 years agoredirct: use iterators and knowledge about preordered arrays for more efficient merging
Moritz Vetter [Mon, 28 Feb 2022 04:13:45 +0000 (05:13 +0100)]
redirct: use iterators and knowledge about preordered arrays for more efficient merging

2 years agoMerge #11573
bors[bot] [Sun, 27 Feb 2022 12:00:04 +0000 (12:00 +0000)]
Merge #11573

11573: refactorings and FIXME fixes in text edit r=lnicola a=HansAuger

This is mainly me learning some rust, and only anecdotally about addressing some `fixme`s. Feel free to nope :)

There is a follow up PR in the pipeline which tackles the other two `fixme`s but it's a bit more invasive. So I wanted to get this out of the way

Co-authored-by: Moritz Vetter <mv@3yourmind.com>
2 years agoMerge #11567
bors[bot] [Sun, 27 Feb 2022 11:34:01 +0000 (11:34 +0000)]
Merge #11567

11567: Fix `if` in #11561 r=Veykril a=ChayimFriedman2

Fixes #11561.

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2 years agoMerge #11570
bors[bot] [Sun, 27 Feb 2022 09:17:46 +0000 (09:17 +0000)]
Merge #11570

11570: minor: Remove misleading comments r=lnicola a=ChayimFriedman2

They're not true anymore after #11375.

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2 years agoRemove misleading comments
Chayim Refael Friedman [Sun, 27 Feb 2022 07:52:11 +0000 (09:52 +0200)]
Remove misleading comments

They're not true anymore after #11375.

2 years agoadd two more unit tests for text_edit
Moritz Vetter [Sun, 27 Feb 2022 01:11:56 +0000 (02:11 +0100)]
add two more unit tests for text_edit

2 years agoFix `if` in #11561
Chayim Refael Friedman [Sun, 27 Feb 2022 00:12:22 +0000 (00:12 +0000)]
Fix `if` in #11561

2 years agoMerge #11560
bors[bot] [Sat, 26 Feb 2022 17:00:11 +0000 (17:00 +0000)]
Merge #11560

11560: internal: Update `url` to make `webrender` build when computing metrics r=jonas-schievink a=lnicola

Closes #9997

This doesn't seem to affect the metrics, but I'm not sure since somehow I get different values than what shows up on CI.

With `stable`:

```
  exprs: 94151, ??ty: 96 (0%), ?ty: 25 (0%), !ty: 6
```

CI shows 16.

Also, https://github.com/rust-analyzer/rust-analyzer/pull/7250 strikes again, I can never tell what those numbers are.

r? `@jonas-schievink`

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoMerge #11565
bors[bot] [Sat, 26 Feb 2022 16:49:16 +0000 (16:49 +0000)]
Merge #11565

11565: fix: Fix body selection in while loops r=Veykril a=lnicola

CC #11561

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoMerge #11566
bors[bot] [Sat, 26 Feb 2022 15:48:11 +0000 (15:48 +0000)]
Merge #11566

11566: minor: Make hir::Local::name infallible r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMake hir::Local::name infallible
Lukas Wirth [Sat, 26 Feb 2022 14:06:11 +0000 (15:06 +0100)]
Make hir::Local::name infallible

2 years agorefact: edit text in place in TextEdit::apply
Moritz Vetter [Sat, 26 Feb 2022 14:50:09 +0000 (15:50 +0100)]
refact: edit text in place in TextEdit::apply

2 years agotest: add unit test for TextEdit::apply()
Moritz Vetter [Sat, 26 Feb 2022 14:46:14 +0000 (15:46 +0100)]
test: add unit test for TextEdit::apply()

2 years agoFix body selection in while loops
Laurențiu Nicola [Sat, 26 Feb 2022 14:45:06 +0000 (16:45 +0200)]
Fix body selection in while loops

2 years agoMerge #11564
bors[bot] [Sat, 26 Feb 2022 13:53:30 +0000 (13:53 +0000)]
Merge #11564

11564: internal: Cleanup highlighting tests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoRename test highlighting output files
Lukas Wirth [Sat, 26 Feb 2022 13:51:13 +0000 (14:51 +0100)]
Rename test highlighting output files

2 years agoSplit up highlighting tests a bit more
Lukas Wirth [Sat, 26 Feb 2022 13:45:09 +0000 (14:45 +0100)]
Split up highlighting tests a bit more

2 years agoRe-order and cleanup highlighting tests
Lukas Wirth [Sat, 26 Feb 2022 13:29:03 +0000 (14:29 +0100)]
Re-order and cleanup highlighting tests

2 years agoMerge #11562
bors[bot] [Sat, 26 Feb 2022 12:54:57 +0000 (12:54 +0000)]
Merge #11562

11562: fix: Don't emit unresolvedReference highlight tags in unlinked files r=Veykril a=Veykril

Emitting these overwrites any syntax based highlighting that is being done in the file, causing a lot of noise if the user gave them a specific color.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: Don't emit unresolvedReference highlight tags in unlinked files
Lukas Wirth [Sat, 26 Feb 2022 12:53:54 +0000 (13:53 +0100)]
fix: Don't emit unresolvedReference highlight tags in unlinked files

2 years agoUpdate url to make webrender build
Laurențiu Nicola [Sat, 26 Feb 2022 09:56:57 +0000 (11:56 +0200)]
Update url to make webrender build

2 years agoMerge #11538
bors[bot] [Fri, 25 Feb 2022 21:17:24 +0000 (21:17 +0000)]
Merge #11538

11538: feat: Make private editable completions configurable, disable by default r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10253
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9885

This does disable these completions by default, as it seems that people find this behaviour surprising(due to other IDEs usually not doing this).

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>