Commit Graph

18210 Commits

Author SHA1 Message Date
Jonas Schievink
e6fdb38d38 Use as_tuple() 2021-07-01 20:45:47 +02:00
bors[bot]
738dd6ed9f
Merge #9431
9431: internal: Implement TypeRef::ForLifetime r=flodiebold a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-01 18:25:06 +00:00
bors[bot]
76d8f55952
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>
2021-07-01 17:58:40 +00:00
Jonas Schievink
69dce13ddd Make unlinked_file diagnostic a hint again 2021-07-01 19:57:50 +02:00
bors[bot]
920b2c8630
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>
2021-07-01 17:21:34 +00:00
Jonas Schievink
28e4b10f46 Fix nested macro in block defining items 2021-07-01 19:20:42 +02:00
bors[bot]
a0b8448b09
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>
2021-07-01 15:29:28 +00:00
Jonas Schievink
33d5793f19 Add a simpler legacy macro scoping test 2021-07-01 17:28:42 +02:00
bors[bot]
e8b9f43084
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>
2021-07-01 12:05:46 +00:00
Laurențiu Nicola
cf9d93a5d6 Don't implement Eq for CrateGraph 2021-07-01 14:10:57 +03:00
bors[bot]
c8c4d73648
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>
2021-06-30 19:52:03 +00:00
Lukas Wirth
04f1104179 Don't classify NameRef paths inside attribute TokenTrees 2021-06-30 21:51:28 +02:00
bors[bot]
2f9645501c
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>
2021-06-30 17:37:28 +00:00
Lukas Wirth
8d3a378de9 Add test for macro expanded test module in runnables 2021-06-30 19:35:58 +02:00
bors[bot]
3c42aefceb
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>
2021-06-30 17:11:34 +00:00
Lukas Wirth
b8507ca98d Don't add test runnables for outline modules in the wrong file 2021-06-30 19:08:13 +02:00
bors[bot]
a3c51bdcb0
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>
2021-06-30 14:04:35 +00:00
kjeremy
bf7651886e Cargo update and pull in the new rowan
This brings in the new hashbrown for better compile times.
2021-06-30 10:03:31 -04:00
Jonas Schievink
b5a2289676 Remove unneeded shifted_in 2021-06-30 15:45:00 +02:00
Jonas Schievink
b502a10b1e update comment 2021-06-30 15:13:59 +02:00
Jonas Schievink
88a86d4ff9 Fix deduction of dyn Fn closure parameter types 2021-06-30 15:04:04 +02:00
Lukas Wirth
af739731db Implement TypeRef::ForLifetime 2021-06-30 01:34:54 +02:00
bors[bot]
11b9233fc4
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>
2021-06-29 19:53:19 +00:00
Milo
4d8fe6208e fix 2021-06-29 20:34:52 +01:00
Milo
d85fa40d58
Update crates/ide/src/status.rs
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-06-29 20:32:33 +01:00
bors[bot]
1b9b2d1f40
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>
2021-06-29 17:39:00 +00:00
Laurențiu Nicola
f1f3d5cb84 Watch for Cargo.toml and .lock changes 2021-06-29 14:38:50 +03:00
bors[bot]
13cbe64a59
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>
2021-06-28 19:57:23 +00:00
Lukas Wirth
9a1b9b3c78 Resolve attribute paths in attribute highlighting 2021-06-28 21:53:17 +02:00
bors[bot]
3ce1a0226c
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>
2021-06-28 18:16:00 +00:00
Jonas Schievink
3ebceb71e3 Handle ::{self} imports 2021-06-28 20:13:33 +02:00
bors[bot]
fa7bb38450
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>
2021-06-28 17:23:24 +00:00
Lukas Wirth
254e8f38d0 Record attributes in attr_query for proc-macros 2021-06-28 19:16:38 +02:00
bors[bot]
ae4279b73f
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>
2021-06-28 17:08:08 +00:00
Lukas Wirth
9957220dfe Fix NameRef::classify path resolution inside attributes 2021-06-28 19:07:23 +02:00
Milo
443d2164ef remove unneeded ifs 2021-06-28 17:52:57 +01:00
Milo
2e60908fde check if counts should be a thing 2021-06-28 17:50:24 +01:00
Milo
5282617127 trailing line 2021-06-28 17:49:19 +01:00
bors[bot]
9ef62b0ccd
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>
2021-06-28 14:42:22 +00:00
Lukas Wirth
34c28c1bbc Include self in usage search for modules in their definition source 2021-06-28 16:41:35 +02:00
Milo
d1821e4b6e fix all reviews 2021-06-28 07:31:54 +01:00
bors[bot]
36a49e5da4
Merge #9415
9415: minor: Avoid redundant clone r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-06-28 06:29:10 +00:00
Laurențiu Nicola
cc54d2bbc6 Avoid redundant clone 2021-06-28 09:28:31 +03:00
bors[bot]
1fa82adfdc
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>
2021-06-26 23:16:38 +00:00
Lukas Wirth
3ce5c66ca1 Deduplicate ast expression walking logic 2021-06-27 01:11:57 +02:00
bors[bot]
ddce8b6033
Merge #9408
9408: intenral: small improvements to compile time r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-25 20:53:32 +00:00
Aleksey Kladov
93e3659194 intenral: small improvements to compile time
AsRef-polymorphism has compile-time cost.
2021-06-25 23:51:54 +03:00
bors[bot]
9552d79f63
Merge #9402
9402: internal: add cloning macro fixture r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-25 20:38:18 +00:00
Aleksey Kladov
c27fdc75fa 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.
2021-06-25 23:37:55 +03:00
bors[bot]
2ac1ffc0f3
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>
2021-06-25 01:48:50 +00:00