]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agominor: untangle complex condition
Aleksey Kladov [Sun, 4 Jul 2021 14:32:59 +0000 (17:32 +0300)]
minor: untangle complex condition

3 years agoMerge #9489
bors[bot] [Sun, 4 Jul 2021 14:04:01 +0000 (14:04 +0000)]
Merge #9489

9489: feat: always prefer postfix snippets if there's exact textual match r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: improve feedback for relevance tests
Aleksey Kladov [Sun, 4 Jul 2021 13:54:30 +0000 (16:54 +0300)]
internal: improve feedback for relevance tests

3 years agofeat: always prefer postfix snippets if there's exact textual match
Aleksey Kladov [Sun, 4 Jul 2021 13:50:02 +0000 (16:50 +0300)]
feat: always prefer postfix snippets if there's exact textual match

Note that, while we don't currently have a fuzzy-matching score, it
makes sense to special-case postfix templates -- it's very annoying when
`.not()` gets sorted before `.not`. We might want to move this infra to
fuzzy matching, once we have that!

3 years agoMerge #9488
bors[bot] [Sun, 4 Jul 2021 12:44:39 +0000 (12:44 +0000)]
Merge #9488

9488: internal: make CompletionItem and SourceChange consistent r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: make CompletionItem and SourceChange consistent
Aleksey Kladov [Sun, 4 Jul 2021 12:41:28 +0000 (15:41 +0300)]
internal: make CompletionItem and SourceChange consistent

Before this PR, SourceChange used a bool and CompletionItem used an enum
to signify if edit is a snippet. It makes sense to use the same pattern
in both cases. `bool` feels simpler, as there's only one consumer of
this API, and all producers are encapsulated anyway (we check the
capability at the production site).

3 years agoMerge #9487
bors[bot] [Sun, 4 Jul 2021 11:15:22 +0000 (11:15 +0000)]
Merge #9487

9487: internal: better factoring for to_proto::completion r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: better factoring for to_proto::completion
Aleksey Kladov [Sun, 4 Jul 2021 11:08:33 +0000 (14:08 +0300)]
internal: better factoring for to_proto::completion

One source completion can produce up to two lsp completions.
Additionally, `preselct` and `sort_text` are global properties of the
whole set of completions, so the right granularity here is to convert
many completions.

As a side-benefit, we no loger allocate intermediate vec.

3 years agoMerge #9485
bors[bot] [Sun, 4 Jul 2021 09:57:11 +0000 (09:57 +0000)]
Merge #9485

9485: minor: style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: style
Aleksey Kladov [Sun, 4 Jul 2021 08:12:41 +0000 (11:12 +0300)]
minor: style

3 years agoMerge #9484
bors[bot] [Sun, 4 Jul 2021 09:48:28 +0000 (09:48 +0000)]
Merge #9484

9484: internal: make `xtask` lighter r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agointernal: make `xtask` lighter
Aleksey Kladov [Sun, 4 Jul 2021 09:42:35 +0000 (12:42 +0300)]
internal: make `xtask` lighter

Moving tests to `rust-analyzer` crate allows removing walkdir dependency
from `xtask`. It does seem more reasonable to keep tidy tests outside of
the "build system" and closer to other integration tests.

3 years agoMerge #9483
bors[bot] [Sun, 4 Jul 2021 08:31:26 +0000 (08:31 +0000)]
Merge #9483

9483: minor: fix lint completion sourcegen r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: fix lint completion sourcegen
Aleksey Kladov [Sun, 4 Jul 2021 08:26:03 +0000 (11:26 +0300)]
minor: fix lint completion sourcegen

3 years agoMerge #9482
bors[bot] [Sun, 4 Jul 2021 08:21:11 +0000 (08:21 +0000)]
Merge #9482

9482: minor: better error message r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agominor: better error message
Aleksey Kladov [Sun, 4 Jul 2021 08:20:31 +0000 (11:20 +0300)]
minor: better error message

3 years agoMerge #9479
bors[bot] [Sat, 3 Jul 2021 21:45:13 +0000 (21:45 +0000)]
Merge #9479

9479: `replace_qualified_name_with_use` insert qualified import paths r=Veykril a=Veykril

Also prevents the assist from triggering on associated items.

Fixes #9472.

This PR gets rid of a lot of tests that only really test the `insert_use` infra which already has its own tests, so these tests are of no use.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years ago`replace_qualified_name_with_use` insert qualified import paths
Lukas Wirth [Sat, 3 Jul 2021 21:42:59 +0000 (23:42 +0200)]
`replace_qualified_name_with_use` insert qualified import paths

3 years agoMerge #9477
bors[bot] [Sat, 3 Jul 2021 20:13:14 +0000 (20:13 +0000)]
Merge #9477

9477: fix: Don't show an import per namespace in auto_import r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't show an import per namespace in auto_import
Lukas Wirth [Sat, 3 Jul 2021 20:11:01 +0000 (22:11 +0200)]
Don't show an import per namespace in auto_import

3 years agoMerge #9476
bors[bot] [Sat, 3 Jul 2021 19:26:04 +0000 (19:26 +0000)]
Merge #9476

9476: internal: overhaul codegen r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofeat: regenrate lint completions
Aleksey Kladov [Sat, 3 Jul 2021 19:24:36 +0000 (22:24 +0300)]
feat: regenrate lint completions

3 years agointernal: overhaul code generation
Aleksey Kladov [Sat, 3 Jul 2021 19:11:03 +0000 (22:11 +0300)]
internal: overhaul code generation

* Keep codegen adjacent to the relevant crates.
* Remove codgen deps from xtask, speeding-up from-source installation.

This regresses the release process a bit, as it now needs to run the
tests (and, by extension, compile the code).

3 years agoMerge #9468
bors[bot] [Sat, 3 Jul 2021 16:13:06 +0000 (16:13 +0000)]
Merge #9468

9468: feat: Make `inline_function` work on methods r=Veykril a=Veykril

Now called `inline_call`.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge the inline function/method assists into `inline_call`
Lukas Wirth [Sat, 3 Jul 2021 15:13:56 +0000 (17:13 +0200)]
Merge the inline function/method assists into `inline_call`

3 years agoMerge #9473
bors[bot] [Sat, 3 Jul 2021 15:41:13 +0000 (15:41 +0000)]
Merge #9473

9473: feat: join lines joins two ifs into `else if` r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3 years agofeat: join lines joins two ifs into `else if`
Aleksey Kladov [Sat, 3 Jul 2021 15:36:08 +0000 (18:36 +0300)]
feat: join lines joins two ifs into `else if`

3 years agoMerge #9471
bors[bot] [Sat, 3 Jul 2021 10:38:17 +0000 (10:38 +0000)]
Merge #9471

9471: minor: Don't hide meta lines r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't hide meta lines
Lukas Wirth [Sat, 3 Jul 2021 10:16:07 +0000 (12:16 +0200)]
Don't hide meta lines

3 years agofeat: Implement `inline_method` assist
Lukas Wirth [Fri, 2 Jul 2021 23:33:34 +0000 (01:33 +0200)]
feat: Implement `inline_method` assist

3 years agoMerge #9467
bors[bot] [Fri, 2 Jul 2021 23:32:12 +0000 (23:32 +0000)]
Merge #9467

9467: internal: wrap_return_type_in_result works on the HIR r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoSimplify
Lukas Wirth [Fri, 2 Jul 2021 21:52:43 +0000 (23:52 +0200)]
Simplify

3 years agowrap_return_type_in_result works on the HIR
Lukas Wirth [Fri, 2 Jul 2021 21:19:32 +0000 (23:19 +0200)]
wrap_return_type_in_result works on the HIR

3 years agoMerge #9465
bors[bot] [Fri, 2 Jul 2021 19:11:08 +0000 (19:11 +0000)]
Merge #9465

9465: feat: `replace_match_with_if_let` works on more 2-arm matches r=Veykril a=Veykril

Now it works on pretty much on all 2-arm matches where only up to 1 arm binds a name instead of requiring either a sad or wildcard pattern to be present.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't check sad pattern equality by text
Lukas Wirth [Fri, 2 Jul 2021 19:10:38 +0000 (21:10 +0200)]
Don't check sad pattern equality by text

3 years ago`replace_match_with_if_let` works on more binary matches
Lukas Wirth [Fri, 2 Jul 2021 19:05:10 +0000 (21:05 +0200)]
`replace_match_with_if_let` works on more binary matches

3 years agoSimplify
Lukas Wirth [Fri, 2 Jul 2021 17:50:37 +0000 (19:50 +0200)]
Simplify

3 years agoAdd cov_mark
Lukas Wirth [Fri, 2 Jul 2021 17:34:49 +0000 (19:34 +0200)]
Add cov_mark

3 years agoMerge #9464
bors[bot] [Fri, 2 Jul 2021 13:51:57 +0000 (13:51 +0000)]
Merge #9464

9464: fix: Fix runnables using wrong file ids for module doctests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix runnables using wrong file ids for module doctests
Lukas Wirth [Fri, 2 Jul 2021 13:43:47 +0000 (15:43 +0200)]
Fix runnables using wrong file ids for module doctests

3 years agoMerge #9463
bors[bot] [Fri, 2 Jul 2021 13:43:40 +0000 (13:43 +0000)]
Merge #9463

9463: fix: Remove incorrect std dep r=jonas-schievink a=jonas-schievink

libstd doesn't actually depend on `proc_macro`. cc https://github.com/rust-analyzer/rust-analyzer/pull/9456#issuecomment-873005974

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoRemove incorrect std dep
Jonas Schievink [Fri, 2 Jul 2021 13:42:42 +0000 (15:42 +0200)]
Remove incorrect std dep

3 years agoMerge #9462
bors[bot] [Fri, 2 Jul 2021 13:35:13 +0000 (13:35 +0000)]
Merge #9462

9462: minor: Print runnable kind on assertion failure for better debuggability r=Veykril a=Veykril

We are somehow hitting this when looking at `crates\ide_db\src\lib.rs` and I don't see how.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoPrint runnable kind on assertion failure for better debuggability
Lukas Wirth [Fri, 2 Jul 2021 13:28:38 +0000 (15:28 +0200)]
Print runnable kind on assertion failure for better debuggability

3 years agoMerge #9461
bors[bot] [Fri, 2 Jul 2021 13:19:12 +0000 (13:19 +0000)]
Merge #9461

9461: fix: Fix incorrect guard for NameRefClass attribute resolution r=Veykril a=Veykril

This is what happens when you forget to write a test
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix incorrect guard for NameRefClass attribute resolution
Lukas Wirth [Fri, 2 Jul 2021 13:17:21 +0000 (15:17 +0200)]
Fix incorrect guard for NameRefClass attribute resolution

3 years agoMerge #9428
bors[bot] [Fri, 2 Jul 2021 12:49:34 +0000 (12:49 +0000)]
Merge #9428

9428: fix: Fix deduction of `dyn Fn` closure parameter types r=flodiebold a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMerge #9458
bors[bot] [Thu, 1 Jul 2021 23:47:38 +0000 (23:47 +0000)]
Merge #9458

9458: minor: Remove make::match_arm_with_guard r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoRemove make::match_arm_with_guard
Lukas Wirth [Thu, 1 Jul 2021 23:44:54 +0000 (01:44 +0200)]
Remove make::match_arm_with_guard

3 years agoMerge #9456
bors[bot] [Thu, 1 Jul 2021 23:39:59 +0000 (23:39 +0000)]
Merge #9456

9456: fix: sysroot: add proc_macro -> std dependency edge r=jonas-schievink a=jonas-schievink

This fixes missing trait implementation on the proc_macro types.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agosysroot: add proc_macro -> std dependency edge
Jonas Schievink [Thu, 1 Jul 2021 23:38:49 +0000 (01:38 +0200)]
sysroot: add proc_macro -> std dependency edge

3 years agoMerge #9455
bors[bot] [Thu, 1 Jul 2021 23:00:50 +0000 (23:00 +0000)]
Merge #9455

9455: feat: Handle not let if expressions in replace_if_let_with_match r=Veykril a=Veykril

Transforms bare `if cond {}` into `_ if cond` guard patterns in the match as long as at least one `if let` is in the if chain, otherwise the assist wont be applicable.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoHandle not let if expressions in replace_if_let_with_match
Lukas Wirth [Thu, 1 Jul 2021 22:58:56 +0000 (00:58 +0200)]
Handle not let if expressions in replace_if_let_with_match

3 years agoMerge #9454
bors[bot] [Thu, 1 Jul 2021 22:24:17 +0000 (22:24 +0000)]
Merge #9454

9454: feat: Empower `replace_if_let_with_match` r=Veykril a=Veykril

Now instead of only working on `if let ... {} else {}` if expressions it now works on all of them where the condition expression is the same text-wise.

This includes if let expressions without an else block, in which case a simple `_ => ()` will be generated in the resulting match but also in more complex cases where multiple `if let` expressions are chained.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoEmpower `replace_if_let_with_match`
Lukas Wirth [Thu, 1 Jul 2021 22:20:27 +0000 (00:20 +0200)]
Empower `replace_if_let_with_match`

3 years agoSubstitute self type instead of fusing binders
Jonas Schievink [Thu, 1 Jul 2021 22:16:36 +0000 (00:16 +0200)]
Substitute self type instead of fusing binders

3 years agoMerge #9452
bors[bot] [Thu, 1 Jul 2021 22:12:53 +0000 (22:12 +0000)]
Merge #9452

9452: feat: Add "View Crate Graph (Full)" r=jonas-schievink a=jonas-schievink

Works like "View Crate Graph", but also includes crates.io and sysroot dependencies. The resulting graph might be enormous.

Closes https://github.com/rust-analyzer/rust-analyzer/issues/8867

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd "View Crate Graph (Full)"
Jonas Schievink [Thu, 1 Jul 2021 22:08:05 +0000 (00:08 +0200)]
Add "View Crate Graph (Full)"

3 years agoMerge #9451
bors[bot] [Thu, 1 Jul 2021 19:52:14 +0000 (19:52 +0000)]
Merge #9451

9451: minor: Add `goto_type_action` for field hovers r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd `goto_type_action` for field hovers
Lukas Wirth [Thu, 1 Jul 2021 19:51:26 +0000 (21:51 +0200)]
Add `goto_type_action` for field hovers

3 years agoMerge #9450
bors[bot] [Thu, 1 Jul 2021 19:33:53 +0000 (19:33 +0000)]
Merge #9450

9450: internal: Add ModuleOrItem guess to import granularity guessing r=Veykril a=Veykril

I think this should be the last fix needed for this(🤞)
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd ModuleOrItem guess to import granularity guessing
Lukas Wirth [Thu, 1 Jul 2021 19:32:35 +0000 (21:32 +0200)]
Add ModuleOrItem guess to import granularity guessing

3 years agoSimplify
Lukas Wirth [Thu, 1 Jul 2021 19:10:45 +0000 (21:10 +0200)]
Simplify

3 years agoBind the right number of variables in the `FnPointer`
Jonas Schievink [Thu, 1 Jul 2021 18:54:25 +0000 (20:54 +0200)]
Bind the right number of variables in the `FnPointer`

3 years agoUse `as_tuple()`
Jonas Schievink [Thu, 1 Jul 2021 18:45:47 +0000 (20:45 +0200)]
Use `as_tuple()`

3 years agoMerge #9431
bors[bot] [Thu, 1 Jul 2021 18:25:06 +0000 (18:25 +0000)]
Merge #9431

9431: internal: Implement TypeRef::ForLifetime r=flodiebold a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoMerge #9447
bors[bot] [Thu, 1 Jul 2021 17:58:40 +0000 (17:58 +0000)]
Merge #9447

9447: fix: Make unlinked_file diagnostic a hint again r=jonas-schievink a=jonas-schievink

#9255 accidentally turned it into an error

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoMake unlinked_file diagnostic a hint again
Jonas Schievink [Thu, 1 Jul 2021 17:57:50 +0000 (19:57 +0200)]
Make unlinked_file diagnostic a hint again

3 years agoMerge #9445
bors[bot] [Thu, 1 Jul 2021 17:21:34 +0000 (17:21 +0000)]
Merge #9445

9445: fix: Fix nested macro in block defining items r=jonas-schievink a=jonas-schievink

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

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoFix nested macro in block defining items
Jonas Schievink [Thu, 1 Jul 2021 17:20:42 +0000 (19:20 +0200)]
Fix nested macro in block defining items

3 years agoMerge #9443
bors[bot] [Thu, 1 Jul 2021 15:29:28 +0000 (15:29 +0000)]
Merge #9443

9443: internal: Add a simpler legacy macro scoping test r=jonas-schievink a=jonas-schievink

This is a lot simpler to understand and debug than the `plain_macros_are_legacy_textual_scoped` test.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoAdd a simpler legacy macro scoping test
Jonas Schievink [Thu, 1 Jul 2021 15:28:42 +0000 (17:28 +0200)]
Add a simpler legacy macro scoping test

3 years agoMerge #9440
bors[bot] [Thu, 1 Jul 2021 12:05:46 +0000 (12:05 +0000)]
Merge #9440

9440: Don't implement `Eq` for `CrateGraph` r=kjeremy a=lnicola

This currently seems [incorrect](https://github.com/rust-analyzer/rust-analyzer/pull/8363/files) and doesn't seem that useful, so maybe we can remove it?

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoDon't implement Eq for CrateGraph
Laurențiu Nicola [Thu, 1 Jul 2021 11:10:57 +0000 (14:10 +0300)]
Don't implement Eq for CrateGraph

3 years agoMerge #9437
bors[bot] [Wed, 30 Jun 2021 19:52:03 +0000 (19:52 +0000)]
Merge #9437

9437: fix: Don't classify paths inside attribute TokenTrees r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't classify NameRef paths inside attribute TokenTrees
Lukas Wirth [Wed, 30 Jun 2021 19:29:40 +0000 (21:29 +0200)]
Don't classify NameRef paths inside attribute TokenTrees

3 years agoMerge #9436
bors[bot] [Wed, 30 Jun 2021 17:37:28 +0000 (17:37 +0000)]
Merge #9436

9436: minor: Add test for macro expanded test module in runnables r=Veykril a=Veykril

Expected this to fail as thats behaving incorrectly on current nightly but I think I fixed this accidentally with https://github.com/rust-analyzer/rust-analyzer/pull/9435
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoAdd test for macro expanded test module in runnables
Lukas Wirth [Wed, 30 Jun 2021 17:35:58 +0000 (19:35 +0200)]
Add test for macro expanded test module in runnables

3 years agoMerge #9435
bors[bot] [Wed, 30 Jun 2021 17:11:34 +0000 (17:11 +0000)]
Merge #9435

9435: fix: Don't add test runnables for outline modules in the wrong file r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoDon't add test runnables for outline modules in the wrong file
Lukas Wirth [Wed, 30 Jun 2021 17:08:13 +0000 (19:08 +0200)]
Don't add test runnables for outline modules in the wrong file

3 years agoMerge #9434
bors[bot] [Wed, 30 Jun 2021 14:04:35 +0000 (14:04 +0000)]
Merge #9434

9434: Cargo update and pull in the new rowan r=kjeremy a=kjeremy

This brings in the new hashbrown for better compile times.

Co-authored-by: kjeremy <kjeremy@gmail.com>
3 years agoCargo update and pull in the new rowan
kjeremy [Wed, 30 Jun 2021 14:03:31 +0000 (10:03 -0400)]
Cargo update and pull in the new rowan

This brings in the new hashbrown for better compile times.

3 years agoRemove unneeded shifted_in
Jonas Schievink [Wed, 30 Jun 2021 13:45:00 +0000 (15:45 +0200)]
Remove unneeded shifted_in

3 years agoupdate comment
Jonas Schievink [Wed, 30 Jun 2021 13:13:31 +0000 (15:13 +0200)]
update comment

3 years agoFix deduction of `dyn Fn` closure parameter types
Jonas Schievink [Tue, 29 Jun 2021 15:35:37 +0000 (17:35 +0200)]
Fix deduction of `dyn Fn` closure parameter types

3 years agoImplement TypeRef::ForLifetime
Lukas Wirth [Tue, 29 Jun 2021 23:34:51 +0000 (01:34 +0200)]
Implement TypeRef::ForLifetime

3 years agoMerge #9269
bors[bot] [Tue, 29 Jun 2021 19:53:19 +0000 (19:53 +0000)]
Merge #9269

9269: Recreate status page r=lnicola a=Milo123459

I'm working on redesigning the status page.

Co-authored-by: Milo <50248166+Milo123459@users.noreply.github.com>
3 years agofix
Milo [Tue, 29 Jun 2021 19:34:52 +0000 (20:34 +0100)]
fix

3 years agoUpdate crates/ide/src/status.rs
Milo [Tue, 29 Jun 2021 19:32:33 +0000 (20:32 +0100)]
Update crates/ide/src/status.rs

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
3 years agoMerge #9426
bors[bot] [Tue, 29 Jun 2021 17:39:00 +0000 (17:39 +0000)]
Merge #9426

9426: fix: Watch for Cargo.toml and .lock changes r=matklad a=lnicola

Maybe closes #5333

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
3 years agoWatch for Cargo.toml and .lock changes
Laurențiu Nicola [Tue, 29 Jun 2021 11:38:50 +0000 (14:38 +0300)]
Watch for Cargo.toml and .lock changes

3 years agoMerge #9423
bors[bot] [Mon, 28 Jun 2021 19:57:23 +0000 (19:57 +0000)]
Merge #9423

9423: fix: Resolve attribute paths in attribute highlighting r=Veykril a=Veykril

Attributes have a new highlighting format now, whereas the `#[` `]` tokens are now tagged with `attribute.attribute` like before, but all other idents inside token trees are now `generic.attribute`. If a path in an attribute can't be resolved it will instead get the `builtinAttribute.attribute` tags now as highlighting doesn't know about builtins like `allow` yet, so we don't want to emit unresolved references.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoResolve attribute paths in attribute highlighting
Lukas Wirth [Mon, 28 Jun 2021 19:34:30 +0000 (21:34 +0200)]
Resolve attribute paths in attribute highlighting

3 years agoMerge #9422
bors[bot] [Mon, 28 Jun 2021 18:16:00 +0000 (18:16 +0000)]
Merge #9422

9422: fix: Handle `::{self}` imports r=jonas-schievink a=jonas-schievink

These import the preceding segment, but only in type namespace. Previously we've imported the name in all namespaces.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
3 years agoHandle `::{self}` imports
Jonas Schievink [Mon, 28 Jun 2021 18:11:58 +0000 (20:11 +0200)]
Handle `::{self}` imports

3 years agoMerge #9421
bors[bot] [Mon, 28 Jun 2021 17:23:24 +0000 (17:23 +0000)]
Merge #9421

9421: minor: Record attributes in attr_query for proc-macros r=jonas-schievink a=Veykril

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoRecord attributes in attr_query for proc-macros
Lukas Wirth [Mon, 28 Jun 2021 17:16:38 +0000 (19:16 +0200)]
Record attributes in attr_query for proc-macros

3 years agoMerge #9420
bors[bot] [Mon, 28 Jun 2021 17:08:08 +0000 (17:08 +0000)]
Merge #9420

9420: fix: Make hover on attribute paths work again r=Veykril a=Veykril

Unfortunately not (yet) unit-testable I believe

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
3 years agoFix `NameRef::classify` path resolution inside attributes
Lukas Wirth [Mon, 28 Jun 2021 16:33:42 +0000 (18:33 +0200)]
Fix `NameRef::classify` path resolution inside attributes

3 years agoremove unneeded ifs
Milo [Mon, 28 Jun 2021 16:52:57 +0000 (17:52 +0100)]
remove unneeded ifs