]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoMerge #10476
bors[bot] [Wed, 6 Oct 2021 20:45:14 +0000 (20:45 +0000)]
Merge #10476

10476: feat: Add `replace_try_expr_with_match` assist r=Veykril a=Crauzer

Adds the replace_try_expr_with_match assist
#10424

Co-authored-by: crauzer <filip.quitko@gmail.com>
2 years agoMerge #10478
bors[bot] [Wed, 6 Oct 2021 20:36:15 +0000 (20:36 +0000)]
Merge #10478

10478: minor: Update Cargo.lock r=Veykril a=Veykril

This causes CI to fail for some reason I think
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoUpdate Cargo.lock
Lukas Wirth [Wed, 6 Oct 2021 20:34:55 +0000 (22:34 +0200)]
Update Cargo.lock

2 years agofix tests
crauzer [Wed, 6 Oct 2021 18:45:18 +0000 (20:45 +0200)]
fix tests

2 years agoadd sourcegen
crauzer [Wed, 6 Oct 2021 18:23:22 +0000 (20:23 +0200)]
add sourcegen

2 years agoAdd replace_try_expr_with_match assist
crauzer [Wed, 6 Oct 2021 18:11:00 +0000 (20:11 +0200)]
Add replace_try_expr_with_match assist

2 years agoMerge #10420
bors[bot] [Wed, 6 Oct 2021 15:05:40 +0000 (15:05 +0000)]
Merge #10420

10420: Parse outer attributes on StructPatternEtCetera r=jonas-schievink a=XFFXFF

Try to fix https://github.com/rust-analyzer/rust-analyzer/issues/8610
Related pr in ungrammer: https://github.com/rust-analyzer/ungrammar/pull/41

Co-authored-by: zhoufan <1247714429@qq.com>
2 years agoMerge #10459
bors[bot] [Wed, 6 Oct 2021 09:38:58 +0000 (09:38 +0000)]
Merge #10459

10459: feat: Add generate constant assist r=Veykril a=longfangsong

Close #10330.
![demo(1)](https://user-images.githubusercontent.com/13777628/135885262-c80de86f-5555-4f84-9508-822243f8a876.gif)

Co-authored-by: longfangsong <longfangsong@icloud.com>
Co-authored-by: 龙方淞 <longfangsong@icloud.com>
2 years agocleanup
longfangsong [Wed, 6 Oct 2021 02:14:12 +0000 (10:14 +0800)]
cleanup

2 years agoUpdate crates/ide_assists/src/handlers/generate_constant.rs
龙方淞 [Wed, 6 Oct 2021 02:06:51 +0000 (10:06 +0800)]
Update crates/ide_assists/src/handlers/generate_constant.rs

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoUpdate crates/ide_assists/src/handlers/generate_constant.rs
龙方淞 [Wed, 6 Oct 2021 02:06:46 +0000 (10:06 +0800)]
Update crates/ide_assists/src/handlers/generate_constant.rs

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMerge #10447
bors[bot] [Tue, 5 Oct 2021 22:03:23 +0000 (22:03 +0000)]
Merge #10447

10447: Add enum variant references CodeLens. r=Veykril a=ericsampson

Co-authored-by: Eric Sampson <esampson@eaze.com>
2 years agoRefactor according to PR comments to remove allocations.
Eric Sampson [Tue, 5 Oct 2021 20:42:45 +0000 (15:42 -0500)]
Refactor according to PR comments to remove allocations.

2 years agoMerge #10458
bors[bot] [Tue, 5 Oct 2021 16:41:11 +0000 (16:41 +0000)]
Merge #10458

10458: feat: Implement custom user snippets r=Veykril a=Veykril

![Y24dX7fOWX](https://user-images.githubusercontent.com/3757771/136059454-ceccfc2c-2c90-46da-8ad1-bac9c2e83ec1.gif)

Allows us to address the following issues:
    - `.arc / .rc / .pin, similar to .box?` https://github.com/rust-analyzer/rust-analyzer/issues/7033
    - `Add unsafe snippet` https://github.com/rust-analyzer/rust-analyzer/issues/10392, would allow users to have this without the diagnostic)
    - `.ok() postfix snippet is annoying` https://github.com/rust-analyzer/rust-analyzer/issues/9636, allows us to get rid of the `ok` postfix and similar ones
    - `Postfix vec completion` https://github.com/rust-analyzer/rust-analyzer/issues/7773

cc https://github.com/rust-analyzer/rust-analyzer/issues/772

Zulipd discussion: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Custom.20Postfix.20snippets

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoRender the expansion of snippets as their docs
Lukas Wirth [Tue, 5 Oct 2021 16:00:27 +0000 (18:00 +0200)]
Render the expansion of snippets as their docs

2 years agoBring the implementation closer to VSCode snippet definitions
Lukas Wirth [Tue, 5 Oct 2021 15:18:40 +0000 (17:18 +0200)]
Bring the implementation closer to VSCode snippet definitions

2 years agoMerge #10440
bors[bot] [Tue, 5 Oct 2021 08:58:40 +0000 (08:58 +0000)]
Merge #10440

10440: Fix Clippy warnings and replace some `if let`s with `match` r=Veykril a=arzg

I decided to try fixing a bunch of Clippy warnings. I am aware of this project’s opinion of Clippy (I have read both [rust-lang/clippy#5537](https://github.com/rust-lang/rust-clippy/issues/5537) and [rust-analyzer/rowan#57 (comment)](https://github.com/rust-analyzer/rowan/pull/57#discussion_r415676159)), so I totally understand if part of or the entirety of this PR is rejected. In particular, I can see how the semicolons and `if let` vs `match` commits provide comparatively little benefit when compared to the ensuing churn.

I tried to separate each kind of change into its own commit to make it easier to discard certain changes. I also only applied Clippy suggestions where I thought they provided a definite improvement to the code (apart from semicolons, which is IMO more of a formatting/consistency question than a linting question). In the end I accumulated a list of 28 Clippy lints I ignored entirely.

Sidenote: I should really have asked about this on Zulip before going through all 1,555 `if let`s in the codebase to decide which ones definitely look better as `match` :P

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2 years agoReplace `if let` with `match` where appropriate
Aramis Razzaghipour [Sun, 3 Oct 2021 12:53:01 +0000 (23:53 +1100)]
Replace `if let` with `match` where appropriate

2 years agoReplace `if let Some(_) = foo` with `if foo.is_some()`
Aramis Razzaghipour [Sun, 3 Oct 2021 12:51:30 +0000 (23:51 +1100)]
Replace `if let Some(_) = foo` with `if foo.is_some()`

2 years agoinitialize vector to required size.
Eric Sampson [Mon, 4 Oct 2021 21:14:01 +0000 (16:14 -0500)]
initialize vector to required size.

2 years agoResolve macros in snippet require items
Lukas Wirth [Mon, 4 Oct 2021 20:45:47 +0000 (22:45 +0200)]
Resolve macros in snippet require items

2 years agoRegen docs
Lukas Wirth [Mon, 4 Oct 2021 20:13:12 +0000 (22:13 +0200)]
Regen docs

2 years agoFix multiple imports acting on files on separately
Lukas Wirth [Mon, 4 Oct 2021 20:05:30 +0000 (22:05 +0200)]
Fix multiple imports acting on files on separately

2 years agoRegen generated_config.adoc
Lukas Wirth [Mon, 4 Oct 2021 19:47:02 +0000 (21:47 +0200)]
Regen generated_config.adoc

2 years agoMake multiple import edits work for completions
Lukas Wirth [Mon, 4 Oct 2021 19:44:33 +0000 (21:44 +0200)]
Make multiple import edits work for completions

2 years agoAdd custom non-postfix snippets
Lukas Wirth [Mon, 4 Oct 2021 17:22:41 +0000 (19:22 +0200)]
Add custom non-postfix snippets

2 years agoMerge #10460
bors[bot] [Mon, 4 Oct 2021 16:24:54 +0000 (16:24 +0000)]
Merge #10460

10460: fix: Only add `proc_macro` to prelude in proc-macro crates r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoOnly add `proc_macro` to prelude in proc-macro crates
Jonas Schievink [Mon, 4 Oct 2021 16:22:39 +0000 (18:22 +0200)]
Only add `proc_macro` to prelude in proc-macro crates

2 years agoMerge #10456
bors[bot] [Mon, 4 Oct 2021 15:58:06 +0000 (15:58 +0000)]
Merge #10456

10456: fix: Avoid cycle when lowering predicates for associated item lookup r=flodiebold a=jonas-schievink

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

(the salsa bug persists, but this lets us avoid it by fixing the underlying bug)

This reimplements the rustc logic in https://github.com/rust-lang/rust/blob/b27661eb33c74cb514dba059b47d86b6582ac1c2/compiler/rustc_typeck/src/collect.rs#L556: When resolving an associated type `T::Item`, we've previously lowered all predicates that could affect `T`, but we actually have to look only at those predicates whose traits define an associated type of the right name.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoAdd generate_constant assist
longfangsong [Mon, 4 Oct 2021 15:53:32 +0000 (23:53 +0800)]
Add generate_constant assist

2 years agoInitial implementation of custom postfix snippets
Lukas Wirth [Mon, 4 Oct 2021 15:49:21 +0000 (17:49 +0200)]
Initial implementation of custom postfix snippets

2 years agoMerge #10457
bors[bot] [Mon, 4 Oct 2021 15:44:19 +0000 (15:44 +0000)]
Merge #10457

10457: internal: remove support for pre-1.47 sysroots r=lnicola a=lnicola

This changed in 1.47 (about a year ago), so it should be pretty safe to remove.

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoAvoid cycle when lowering predicates for associated item lookup
Jonas Schievink [Mon, 4 Oct 2021 15:39:55 +0000 (17:39 +0200)]
Avoid cycle when lowering predicates for associated item lookup

2 years agoRemove support for old-style sysroot
Laurențiu Nicola [Mon, 4 Oct 2021 15:36:56 +0000 (18:36 +0300)]
Remove support for old-style sysroot

2 years agoMerge #10451
bors[bot] [Mon, 4 Oct 2021 13:18:21 +0000 (13:18 +0000)]
Merge #10451

10451: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSimplify
Lukas Wirth [Mon, 4 Oct 2021 13:16:13 +0000 (15:16 +0200)]
Simplify

2 years agoMerge #10449
bors[bot] [Mon, 4 Oct 2021 09:47:03 +0000 (09:47 +0000)]
Merge #10449

10449: make Some(1..) parsed r=lnicola a=XFFXFF

fixes https://github.com/rust-analyzer/rust-analyzer/issues/9066
[rustc_ty_utils/src/ty.rs](https://github.com/rust-lang/rust/blob/d7795d302adbb8c1547c952cd0d04a7f9ca29262/compiler/rustc_ty_utils/src/ty.rs#L524)

Co-authored-by: zhoufan <1247714429@qq.com>
2 years agomake Some(1..) parsed
zhoufan [Mon, 4 Oct 2021 09:33:48 +0000 (17:33 +0800)]
make Some(1..) parsed

2 years agotweak variable names.
Eric Sampson [Mon, 4 Oct 2021 07:42:13 +0000 (02:42 -0500)]
tweak variable names.

2 years agoneed to update some generated files.
Eric Sampson [Mon, 4 Oct 2021 07:30:46 +0000 (02:30 -0500)]
need to update some generated files.

2 years agoAdd enum variant references CodeLens.
Eric Sampson [Mon, 4 Oct 2021 07:18:31 +0000 (02:18 -0500)]
Add enum variant references CodeLens.

2 years agoMerge #10442
bors[bot] [Sun, 3 Oct 2021 14:58:28 +0000 (14:58 +0000)]
Merge #10442

10442: fix: Limit depth to 1 when searching for `Cargo.toml` r=matklad a=lnicola

...and add `rust-project.json`.

More or less fixes #7268

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoLimit depth to 1 when searching for Cargo.toml
Laurențiu Nicola [Sun, 3 Oct 2021 14:42:45 +0000 (17:42 +0300)]
Limit depth to 1 when searching for Cargo.toml

2 years agoMerge #10441
bors[bot] [Sun, 3 Oct 2021 13:35:47 +0000 (13:35 +0000)]
Merge #10441

10441: feat: Hide type inlay hints for constructors r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/3022
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoHide generic constructors if appropriate
Lukas Wirth [Sun, 3 Oct 2021 13:31:35 +0000 (15:31 +0200)]
Hide generic constructors if appropriate

2 years agoFix miscellaneous Clippy lints
Aramis Razzaghipour [Sun, 3 Oct 2021 12:45:08 +0000 (23:45 +1100)]
Fix miscellaneous Clippy lints

2 years agofeat: Hide type inlay hints for constructors
Lukas Wirth [Sun, 3 Oct 2021 12:45:21 +0000 (14:45 +0200)]
feat: Hide type inlay hints for constructors

2 years agoAdd semicolons for consistency
Aramis Razzaghipour [Sun, 3 Oct 2021 12:39:43 +0000 (23:39 +1100)]
Add semicolons for consistency

`clippy::semicolon_if_nothing_returned`

2 years agoMerge #10439
bors[bot] [Sun, 3 Oct 2021 12:19:02 +0000 (12:19 +0000)]
Merge #10439

10439: fix: fix insert_use incorrectly merging glob imports r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6800
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agofix: fix insert_use incorrectly merging glob imports
Lukas Wirth [Sun, 3 Oct 2021 11:52:46 +0000 (13:52 +0200)]
fix: fix insert_use incorrectly merging glob imports

2 years agoMove module private logic down
Lukas Wirth [Sun, 3 Oct 2021 11:52:40 +0000 (13:52 +0200)]
Move module private logic down

2 years agoMerge #10438
bors[bot] [Sun, 3 Oct 2021 11:06:06 +0000 (11:06 +0000)]
Merge #10438

10438: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agominor: Simplify
Lukas Wirth [Sun, 3 Oct 2021 10:42:00 +0000 (12:42 +0200)]
minor: Simplify

2 years agoMerge #10436
bors[bot] [Sun, 3 Oct 2021 10:07:58 +0000 (10:07 +0000)]
Merge #10436

10436: fix: await insertion with try_expr during extract_function r=Veykril a=feniljain

Fixing  #10333

Co-authored-by: vi_mi <fenil.jain2018@vitstudent.ac.in>
2 years agofix: await insertion with try_expr during extract_function
vi_mi [Sun, 3 Oct 2021 08:26:19 +0000 (08:26 +0000)]
fix: await insertion with try_expr during extract_function

2 years agoMerge #10437
bors[bot] [Sun, 3 Oct 2021 09:10:33 +0000 (09:10 +0000)]
Merge #10437

10437: fix: Fix extract_variable not allowing to extract macro calls r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/6866
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix extract_variable not allowing to extract macro calls
Lukas Wirth [Sun, 3 Oct 2021 09:09:49 +0000 (11:09 +0200)]
Fix extract_variable not allowing to extract macro calls

2 years agomove outer_attrs call before the match
zhoufan [Sun, 3 Oct 2021 01:22:02 +0000 (09:22 +0800)]
move outer_attrs call before the match

2 years agoMerge #10431
bors[bot] [Sat, 2 Oct 2021 17:39:06 +0000 (17:39 +0000)]
Merge #10431

10431: internal: cleanup mbe a bit r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: simplify
Aleksey Kladov [Sat, 2 Oct 2021 17:38:28 +0000 (20:38 +0300)]
minor: simplify

2 years agominor: cleanup
Aleksey Kladov [Sat, 2 Oct 2021 17:21:23 +0000 (20:21 +0300)]
minor: cleanup

2 years agointernal: move code to where it's used and reduce visibility
Aleksey Kladov [Sat, 2 Oct 2021 17:11:08 +0000 (20:11 +0300)]
internal: move code to where it's used and reduce visibility

2 years agoMerge #10430
bors[bot] [Sat, 2 Oct 2021 16:51:55 +0000 (16:51 +0000)]
Merge #10430

10430: fix: Fix rename trying to edit the same range multiple times for certain macro inputs r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10324
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix rename trying to edit the same range multiple times
Lukas Wirth [Sat, 2 Oct 2021 16:50:21 +0000 (18:50 +0200)]
Fix rename trying to edit the same range multiple times

2 years agoMerge #10421
bors[bot] [Sat, 2 Oct 2021 16:43:24 +0000 (16:43 +0000)]
Merge #10421

10421: minor: Bump npm non-dev deps r=lnicola a=lnicola

Fixes #10407

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoMerge #10429
bors[bot] [Sat, 2 Oct 2021 16:34:03 +0000 (16:34 +0000)]
Merge #10429

10429: internal: remove deprecated method r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: dead code
Aleksey Kladov [Sat, 2 Oct 2021 12:32:23 +0000 (15:32 +0300)]
minor: dead code

2 years agointernal: remove deprecated method
Aleksey Kladov [Sat, 2 Oct 2021 12:26:02 +0000 (15:26 +0300)]
internal: remove deprecated method

2 years agominor: reduce duplication
Aleksey Kladov [Sat, 2 Oct 2021 12:24:32 +0000 (15:24 +0300)]
minor: reduce duplication

2 years agoMerge #10428
bors[bot] [Sat, 2 Oct 2021 12:20:45 +0000 (12:20 +0000)]
Merge #10428

10428: minor: regen r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: regen
Aleksey Kladov [Sat, 2 Oct 2021 12:20:16 +0000 (15:20 +0300)]
minor: regen

2 years agominor: generated code readability
Aleksey Kladov [Sat, 2 Oct 2021 12:20:03 +0000 (15:20 +0300)]
minor: generated code readability

2 years agoMerge #10427
bors[bot] [Sat, 2 Oct 2021 10:21:07 +0000 (10:21 +0000)]
Merge #10427

10427: minor r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor
Aleksey Kladov [Sat, 2 Oct 2021 10:20:45 +0000 (13:20 +0300)]
minor

2 years agoMerge #10426
bors[bot] [Sat, 2 Oct 2021 10:06:24 +0000 (10:06 +0000)]
Merge #10426

10426: internal: use naming that matches intended use-case r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: untangle usages of ReferenceCategory somewhat
Aleksey Kladov [Sat, 2 Oct 2021 10:02:06 +0000 (13:02 +0300)]
internal: untangle usages of ReferenceCategory somewhat

Not everything that can be read or write is a reference, let's try to
use more precise types.

2 years agoMerge #10425
bors[bot] [Sat, 2 Oct 2021 09:54:33 +0000 (09:54 +0000)]
Merge #10425

10425: fix: remove semicolon diagnostics only highlights the semi r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agofix: remove semicolon diagnostics only highlights the semi
Aleksey Kladov [Sat, 2 Oct 2021 09:51:29 +0000 (12:51 +0300)]
fix: remove semicolon diagnostics only highlights the semi

2 years agointernal: use naming that matches intended use-case
Aleksey Kladov [Sat, 2 Oct 2021 09:18:18 +0000 (12:18 +0300)]
internal: use naming that matches intended use-case

2 years agoMerge #10422
bors[bot] [Sat, 2 Oct 2021 07:08:48 +0000 (07:08 +0000)]
Merge #10422

10422: fix: overwrite files when calling `patchelf` r=lnicola a=lnicola

Fixes #10379

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoRemove temporary file on exception
Laurențiu Nicola [Sat, 2 Oct 2021 07:07:50 +0000 (10:07 +0300)]
Remove temporary file on exception

2 years agoOverwrite file when running patchelf
Laurențiu Nicola [Sat, 2 Oct 2021 07:05:39 +0000 (10:05 +0300)]
Overwrite file when running patchelf

2 years agoBump npm non-dev deps
Laurențiu Nicola [Sat, 2 Oct 2021 04:37:51 +0000 (07:37 +0300)]
Bump npm non-dev deps

2 years agoParse outer attributes on StructPatternEtCetera
zhoufan [Sat, 2 Oct 2021 01:57:44 +0000 (09:57 +0800)]
Parse outer attributes on StructPatternEtCetera

2 years agoMerge #10418
bors[bot] [Fri, 1 Oct 2021 20:01:42 +0000 (20:01 +0000)]
Merge #10418

10418: Add whitespace between lifetime and mut keyword in "expand macro" command r=lnicola a=nathanwhit

Before, we were only adding whitespace between a lifetime and the following ident, which produced invalid code for mutable references.

Before this PR:
```rust
macro_rules! foo {
    () => {
        pub struct Foo<'a> {
            foo: &'a mut str,
        }
    };
}
foo!(); // <- expand macro here
```
expanded to
```rust
pub struct Foo< 'a>{
  foo: & 'amut str,
}
```

with this PR, it expands to
```rust
pub struct Foo< 'a>{
  foo: & 'a mut str,
}
```

Co-authored-by: nathan.whitaker <nathan.whitaker01@gmail.com>
2 years agoAdd whitespace b/w lifetime and mut in expansion
nathan.whitaker [Fri, 1 Oct 2021 19:29:26 +0000 (15:29 -0400)]
Add whitespace b/w lifetime and mut in expansion

2 years agoMerge #10416
bors[bot] [Fri, 1 Oct 2021 18:27:55 +0000 (18:27 +0000)]
Merge #10416

10416: docs: add note about `vscode-vim` in `on_enter` r=lnicola a=7596ff

I found myself search for this, so building off of #3013 and #3308, I
hope this note is useful.

Co-authored-by: Cassandra McCarthy <cassie@7596ff.com>
2 years agodocs: add note about `vscode-vim` in `on_enter`
Cassandra McCarthy [Fri, 1 Oct 2021 18:12:32 +0000 (14:12 -0400)]
docs: add note about `vscode-vim` in `on_enter`

I found myself search for this, so building off of #3013 and #3308, I
hope this note is useful.

2 years agoMerge #10415
bors[bot] [Fri, 1 Oct 2021 15:58:58 +0000 (15:58 +0000)]
Merge #10415

10415: minor: Bump deps r=lnicola a=lnicola

Hopefully the new `libc` works now. The FreeBSD issue was fixed in https://github.com/rust-lang/rust/pull/88676.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoBump notify
Laurențiu Nicola [Fri, 1 Oct 2021 15:57:04 +0000 (18:57 +0300)]
Bump notify

2 years agoBump memmap2
Laurențiu Nicola [Fri, 1 Oct 2021 15:55:52 +0000 (18:55 +0300)]
Bump memmap2

2 years agoBump libc
Laurențiu Nicola [Fri, 1 Oct 2021 15:51:45 +0000 (18:51 +0300)]
Bump libc

2 years agoBump deps
Laurențiu Nicola [Fri, 1 Oct 2021 15:50:52 +0000 (18:50 +0300)]
Bump deps

2 years agoMerge #10414
bors[bot] [Fri, 1 Oct 2021 13:30:30 +0000 (13:30 +0000)]
Merge #10414

10414: internal: Add some profiling calls to name resolution r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoAdd some profiling calls to name resolution
Jonas Schievink [Fri, 1 Oct 2021 13:30:00 +0000 (15:30 +0200)]
Add some profiling calls to name resolution

2 years agoMerge #10413
bors[bot] [Fri, 1 Oct 2021 11:31:32 +0000 (11:31 +0000)]
Merge #10413

10413: fix: Fix format highlighting with `concat!` and `unreachable!` r=jonas-schievink a=jonas-schievink

Last item in https://github.com/rust-analyzer/rust-analyzer/issues/10394, closes https://github.com/rust-analyzer/rust-analyzer/issues/10394

Also documents why/how `is_format_string` even works, since I found that nontrivial.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoFix format highlighting with `concat!`
Jonas Schievink [Fri, 1 Oct 2021 11:28:05 +0000 (13:28 +0200)]
Fix format highlighting with `concat!`

2 years agoMerge #10403
bors[bot] [Fri, 1 Oct 2021 11:18:52 +0000 (11:18 +0000)]
Merge #10403

10403: feat: Add semantic token modifier for crate root r=Veykril a=lhvy

Resolves #9073

I managed to implement crate root highlighting for crates mentioned specifically by name (e.g. `serde` in `use serde::Serialize;`), but not for crates referred to with `crate` or `super`. How could I implement this?

> P.S. I'm participating in [Hacktoberfest 2021](https://hacktoberfest.digitalocean.com/). If this PR is up to standard and merged, I'd appreciate if the `hacktoberfest-accepted` label could be added. Thanks!

Co-authored-by: lhvy <me@lhvy.dev>
2 years agoAdd semantic token modifier for crate root
lhvy [Thu, 30 Sep 2021 15:01:31 +0000 (01:01 +1000)]
Add semantic token modifier for crate root

2 years agoMerge #10412
bors[bot] [Fri, 1 Oct 2021 10:35:15 +0000 (10:35 +0000)]
Merge #10412

10412: feat: highlight `asm!` as format string r=jonas-schievink a=jonas-schievink

![screenshot-2021-10-01-12:34:31](https://user-images.githubusercontent.com/1786438/135606261-a1cb6caf-0a7f-45f7-9dde-0275370b0889.png)

part of https://github.com/rust-analyzer/rust-analyzer/issues/10394

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>