]>
git.lizzy.rs Git - rust.git/log
Lukas Wirth [Sat, 3 Jul 2021 19:42:59 +0000 (21:42 +0200)]
Add some more `inline_call` tests
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>
Aleksey Kladov [Sat, 3 Jul 2021 19:24:36 +0000 (22:24 +0300)]
feat: regenrate lint completions
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).
Lukas Wirth [Sat, 3 Jul 2021 18:05:00 +0000 (20:05 +0200)]
Inline parameters in `inline_call` if possible
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>
Lukas Wirth [Sat, 3 Jul 2021 15:13:56 +0000 (17:13 +0200)]
Merge the inline function/method assists into `inline_call`
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>
Aleksey Kladov [Sat, 3 Jul 2021 15:36:08 +0000 (18:36 +0300)]
feat: join lines joins two ifs into `else if`
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>
Lukas Wirth [Sat, 3 Jul 2021 10:16:07 +0000 (12:16 +0200)]
Don't hide meta lines
Daiki Ihara [Sat, 3 Jul 2021 03:43:25 +0000 (12:43 +0900)]
Update ISSUE_TEMPLATE
Daiki Ihara [Mon, 28 Jun 2021 12:55:21 +0000 (21:55 +0900)]
Update bug_repord template
Lukas Wirth [Fri, 2 Jul 2021 23:33:34 +0000 (01:33 +0200)]
feat: Implement `inline_method` assist
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>
Lukas Wirth [Fri, 2 Jul 2021 21:52:43 +0000 (23:52 +0200)]
Simplify
Lukas Wirth [Fri, 2 Jul 2021 21:19:32 +0000 (23:19 +0200)]
wrap_return_type_in_result works on the HIR
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>
Lukas Wirth [Fri, 2 Jul 2021 19:10:38 +0000 (21:10 +0200)]
Don't check sad pattern equality by text
Lukas Wirth [Fri, 2 Jul 2021 19:05:10 +0000 (21:05 +0200)]
`replace_match_with_if_let` works on more binary matches
Lukas Wirth [Fri, 2 Jul 2021 17:50:37 +0000 (19:50 +0200)]
Simplify
Lukas Wirth [Fri, 2 Jul 2021 17:34:49 +0000 (19:34 +0200)]
Add cov_mark
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>
Lukas Wirth [Fri, 2 Jul 2021 13:43:47 +0000 (15:43 +0200)]
Fix runnables using wrong file ids for module doctests
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>
Jonas Schievink [Fri, 2 Jul 2021 13:42:42 +0000 (15:42 +0200)]
Remove incorrect std dep
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>
Lukas Wirth [Fri, 2 Jul 2021 13:28:38 +0000 (15:28 +0200)]
Print runnable kind on assertion failure for better debuggability
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>
Lukas Wirth [Fri, 2 Jul 2021 13:17:21 +0000 (15:17 +0200)]
Fix incorrect guard for NameRefClass attribute resolution
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>
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>
Lukas Wirth [Thu, 1 Jul 2021 23:44:54 +0000 (01:44 +0200)]
Remove make::match_arm_with_guard
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>
Jonas Schievink [Thu, 1 Jul 2021 23:38:49 +0000 (01:38 +0200)]
sysroot: add proc_macro -> std dependency edge
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>
Lukas Wirth [Thu, 1 Jul 2021 22:58:56 +0000 (00:58 +0200)]
Handle not let if expressions in replace_if_let_with_match
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>
Lukas Wirth [Thu, 1 Jul 2021 22:20:27 +0000 (00:20 +0200)]
Empower `replace_if_let_with_match`
Jonas Schievink [Thu, 1 Jul 2021 22:16:36 +0000 (00:16 +0200)]
Substitute self type instead of fusing binders
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>
Jonas Schievink [Thu, 1 Jul 2021 22:08:05 +0000 (00:08 +0200)]
Add "View Crate Graph (Full)"
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>
Lukas Wirth [Thu, 1 Jul 2021 19:51:26 +0000 (21:51 +0200)]
Add `goto_type_action` for field hovers
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>
Lukas Wirth [Thu, 1 Jul 2021 19:32:35 +0000 (21:32 +0200)]
Add ModuleOrItem guess to import granularity guessing
Lukas Wirth [Thu, 1 Jul 2021 19:10:45 +0000 (21:10 +0200)]
Simplify
Jonas Schievink [Thu, 1 Jul 2021 18:54:25 +0000 (20:54 +0200)]
Bind the right number of variables in the `FnPointer`
Jonas Schievink [Thu, 1 Jul 2021 18:45:47 +0000 (20:45 +0200)]
Use `as_tuple()`
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>
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>
Jonas Schievink [Thu, 1 Jul 2021 17:57:50 +0000 (19:57 +0200)]
Make unlinked_file diagnostic a hint again
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>
Jonas Schievink [Thu, 1 Jul 2021 17:20:42 +0000 (19:20 +0200)]
Fix nested macro in block defining items
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>
Jonas Schievink [Thu, 1 Jul 2021 15:28:42 +0000 (17:28 +0200)]
Add a simpler legacy macro scoping test
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>
Laurențiu Nicola [Thu, 1 Jul 2021 11:10:57 +0000 (14:10 +0300)]
Don't implement Eq for CrateGraph
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>
Lukas Wirth [Wed, 30 Jun 2021 19:29:40 +0000 (21:29 +0200)]
Don't classify NameRef paths inside attribute TokenTrees
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>
Lukas Wirth [Wed, 30 Jun 2021 17:35:58 +0000 (19:35 +0200)]
Add test for macro expanded test module in runnables
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>
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
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>
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.
Jonas Schievink [Wed, 30 Jun 2021 13:45:00 +0000 (15:45 +0200)]
Remove unneeded shifted_in
Jonas Schievink [Wed, 30 Jun 2021 13:13:31 +0000 (15:13 +0200)]
update comment
Jonas Schievink [Tue, 29 Jun 2021 15:35:37 +0000 (17:35 +0200)]
Fix deduction of `dyn Fn` closure parameter types
Lukas Wirth [Tue, 29 Jun 2021 23:34:51 +0000 (01:34 +0200)]
Implement TypeRef::ForLifetime
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>
Milo [Tue, 29 Jun 2021 19:34:52 +0000 (20:34 +0100)]
fix
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>
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>
Laurențiu Nicola [Tue, 29 Jun 2021 11:38:50 +0000 (14:38 +0300)]
Watch for Cargo.toml and .lock changes
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>
Lukas Wirth [Mon, 28 Jun 2021 19:34:30 +0000 (21:34 +0200)]
Resolve attribute paths in attribute highlighting
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>
Jonas Schievink [Mon, 28 Jun 2021 18:11:58 +0000 (20:11 +0200)]
Handle `::{self}` imports
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>
Lukas Wirth [Mon, 28 Jun 2021 17:16:38 +0000 (19:16 +0200)]
Record attributes in attr_query for proc-macros
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>
Lukas Wirth [Mon, 28 Jun 2021 16:33:42 +0000 (18:33 +0200)]
Fix `NameRef::classify` path resolution inside attributes
Milo [Mon, 28 Jun 2021 16:52:57 +0000 (17:52 +0100)]
remove unneeded ifs
Milo [Mon, 28 Jun 2021 16:50:24 +0000 (17:50 +0100)]
check if counts should be a thing
Milo [Mon, 28 Jun 2021 16:49:19 +0000 (17:49 +0100)]
trailing line
bors[bot] [Mon, 28 Jun 2021 14:42:22 +0000 (14:42 +0000)]
Merge #9418
9418: internal: Include `self` in usage search for modules in their definition source r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Mon, 28 Jun 2021 14:41:35 +0000 (16:41 +0200)]
Include `self` in usage search for modules in their definition source
Milo [Mon, 28 Jun 2021 06:31:54 +0000 (07:31 +0100)]
fix all reviews
bors[bot] [Mon, 28 Jun 2021 06:29:10 +0000 (06:29 +0000)]
Merge #9415
9415: minor: Avoid redundant clone r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Mon, 28 Jun 2021 06:28:31 +0000 (09:28 +0300)]
Avoid redundant clone
bors[bot] [Sat, 26 Jun 2021 23:16:38 +0000 (23:16 +0000)]
Merge #9413
9413: internal: Deduplicate ast expression walking logic r=Veykril a=Veykril
Deduplicates the duplication introduced in #9375 and #9396 while also fixing a few bugs in both the assist and related highlighting.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 26 Jun 2021 23:11:57 +0000 (01:11 +0200)]
Deduplicate ast expression walking logic
bors[bot] [Fri, 25 Jun 2021 20:53:32 +0000 (20:53 +0000)]
Merge #9408
9408: intenral: small improvements to compile time r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 25 Jun 2021 20:51:54 +0000 (23:51 +0300)]
intenral: small improvements to compile time
AsRef-polymorphism has compile-time cost.
bors[bot] [Fri, 25 Jun 2021 20:38:18 +0000 (20:38 +0000)]
Merge #9402
9402: internal: add cloning macro fixture r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 25 Jun 2021 07:32:13 +0000 (10:32 +0300)]
internal: add cloning macro fixture
Macro that deep clone the tokens but otherwise preserves source
locations and hygiene info is an interesting case for IDE support. Lets
have this, although we don't actively use it at the moment.
bors[bot] [Fri, 25 Jun 2021 01:48:50 +0000 (01:48 +0000)]
Merge #9400
9400: fix: Fix renaming associated trait items with colliding names r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 25 Jun 2021 01:45:41 +0000 (03:45 +0200)]
Fix renaming associated trait items with colliding names
bors[bot] [Thu, 24 Jun 2021 20:21:20 +0000 (20:21 +0000)]
Merge #9398
9398: minor: Complete `macro_use` attribute on modules r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>