Lukas Wirth
46c42166d6
Yeet replace_unwrap_with_match
in favor of inline_call
2021-07-05 15:47:55 +02:00
bors[bot]
ac300eaceb
Merge #9497
...
9497: Wrap inlined closures in parens when inlined in an expression in `inline_call` r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-05 13:42:37 +00:00
Lukas Wirth
dafbe6940e
Wrap inlined closures in parens when inlined in an expression in inline_call
2021-07-05 15:42:11 +02:00
bors[bot]
1ef077af70
Merge #9494
...
9494: feat: show 'as' or 'use' before label traits r=matklad a=mahdi-frms
based on #9478 discussions: showing 'as' before already imported traits and 'use' on auto-import cased
![Screenshot from 2021-07-05 16-54-59](https://user-images.githubusercontent.com/62165556/124471905-b5dcdd80-ddb2-11eb-8852-1d703ef6023f.png )
![Screenshot from 2021-07-05 16-55-20](https://user-images.githubusercontent.com/62165556/124471923-bffedc00-ddb2-11eb-9571-31b8b95499f1.png )
Co-authored-by: mahdi-frms <mahdif1380@outlook.com>
2021-07-05 12:40:02 +00:00
Lukas Wirth
2579dc6d82
Update inline_call
assist doc example
2021-07-05 14:24:25 +02:00
mahdi-frms
6ac54319ea
show 'as' or 'use' before label traits
2021-07-05 16:44:44 +04:30
bors[bot]
2bc4f9e371
Merge #9474
...
9474: fix: Inline parameters in `inline_call` if possible r=Veykril a=Veykril
Fixes #9491
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-05 11:50:18 +00:00
Lukas Wirth
ea02d27a1e
Fixup emitted whitespace in most cases
2021-07-05 13:44:42 +02:00
bors[bot]
b52306ed37
Merge #9493
...
9493: minor: drop dummy authors field r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-05 11:20:21 +00:00
Aleksey Kladov
86720f2953
minor: drop dummy authors field
2021-07-05 14:19:41 +03:00
mahdi-frms
02d33c9856
eliminate find_use_path and show 'as' and 'use'
2021-07-05 02:15:31 +04:30
mahdi-frms
486bffc23e
show imported trait on autocompletion of associated items
2021-07-05 02:13:49 +04:30
Aleksey Kladov
c4d2671767
minor: untangle complex condition
2021-07-04 17:32:59 +03:00
Aleksey Kladov
9b3292541c
internal: improve feedback for relevance tests
2021-07-04 17:03:28 +03:00
Aleksey Kladov
fbb9d69758
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!
2021-07-04 16:50:02 +03:00
Aleksey Kladov
6e9780c005
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).
2021-07-04 15:44:03 +03:00
Aleksey Kladov
f34762abb7
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.
2021-07-04 14:08:33 +03:00
bors[bot]
108b56f354
Merge #9485
...
9485: minor: style r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-04 09:57:11 +00:00
Aleksey Kladov
3be9ebe2c3
minor: style
2021-07-04 12:48:29 +03:00
bors[bot]
775a85acb8
Merge #9484
...
9484: internal: make `xtask` lighter r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-04 09:48:28 +00:00
Aleksey Kladov
90e27d6289
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.
2021-07-04 12:47:56 +03:00
bors[bot]
27188d0b04
Merge #9483
...
9483: minor: fix lint completion sourcegen r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-04 08:31:26 +00:00
Aleksey Kladov
e9d52c23b3
minor: fix lint completion sourcegen
2021-07-04 11:30:56 +03:00
Aleksey Kladov
c2704bebc1
minor: better error message
2021-07-04 11:20:31 +03:00
Lukas Wirth
e41b5348b8
replace_qualified_name_with_use
insert qualified import paths
2021-07-03 23:42:59 +02:00
bors[bot]
e73328f22a
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>
2021-07-03 20:13:14 +00:00
Lukas Wirth
05ec824ab7
Don't show an import per namespace in auto_import
2021-07-03 22:11:01 +02:00
Lukas Wirth
6181154d50
Add some more inline_call
tests
2021-07-03 21:42:59 +02:00
bors[bot]
336194c09b
Merge #9476
...
9476: internal: overhaul codegen r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-07-03 19:26:04 +00:00
Aleksey Kladov
660930623e
feat: regenrate lint completions
2021-07-03 22:24:36 +03:00
Aleksey Kladov
58d2ece88a
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).
2021-07-03 22:11:03 +03:00
Lukas Wirth
d308f17a21
Inline parameters in inline_call
if possible
2021-07-03 20:05:54 +02:00
bors[bot]
888bb6c452
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>
2021-07-03 16:13:06 +00:00
Lukas Wirth
14e18bfa38
Merge the inline function/method assists into inline_call
2021-07-03 18:07:03 +02:00
Aleksey Kladov
f875b91fdb
feat: join lines joins two ifs into else if
2021-07-03 18:40:23 +03:00
Lukas Wirth
9c923068fb
Don't hide meta lines
2021-07-03 12:16:07 +02:00
Lukas Wirth
688398febc
feat: Implement inline_method
assist
2021-07-03 01:33:34 +02:00
Lukas Wirth
fbdcb49d48
Simplify
2021-07-03 01:31:41 +02:00
Lukas Wirth
26dd0c4e5b
wrap_return_type_in_result works on the HIR
2021-07-02 23:19:32 +02:00
Lukas Wirth
eb3f90b301
Don't check sad pattern equality by text
2021-07-02 21:10:44 +02:00
Lukas Wirth
251f0c6090
replace_match_with_if_let
works on more binary matches
2021-07-02 21:05:10 +02:00
Lukas Wirth
f1819525f5
Simplify
2021-07-02 19:50:37 +02:00
Lukas Wirth
a7d61ddba4
Add cov_mark
2021-07-02 19:34:49 +02:00
bors[bot]
dd69d4a97c
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>
2021-07-02 13:51:57 +00:00
Lukas Wirth
59eec29e1b
Fix runnables using wrong file ids for module doctests
2021-07-02 15:43:47 +02:00
Jonas Schievink
3fa07b31c9
Remove incorrect std dep
2021-07-02 15:42:42 +02:00
Lukas Wirth
0b8e145641
Print runnable kind on assertion failure for better debuggability
2021-07-02 15:34:26 +02:00
Lukas Wirth
f640f2dbb4
Fix incorrect guard for NameRefClass attribute resolution
2021-07-02 15:17:21 +02:00
bors[bot]
16871f6f93
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>
2021-07-02 12:49:34 +00:00
bors[bot]
d18cfd4467
Merge #9458
...
9458: minor: Remove make::match_arm_with_guard r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-01 23:47:38 +00:00
Lukas Wirth
071ac48b6c
Remove make::match_arm_with_guard
2021-07-02 01:44:54 +02:00
Jonas Schievink
be0f1d5ca6
sysroot: add proc_macro -> std dependency edge
2021-07-02 01:38:49 +02:00
bors[bot]
cd3d633850
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>
2021-07-01 23:00:50 +00:00
Lukas Wirth
8967856d78
Handle not let if expressions in replace_if_let_with_match
2021-07-02 00:58:56 +02:00
bors[bot]
51d85e1060
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>
2021-07-01 22:24:17 +00:00
Lukas Wirth
20be999304
Empower replace_if_let_with_match
2021-07-02 00:21:21 +02:00
Jonas Schievink
835d1cec59
Substitute self type instead of fusing binders
2021-07-02 00:16:36 +02:00
bors[bot]
334c7eba8d
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>
2021-07-01 22:12:53 +00:00
Jonas Schievink
5f13fb9db9
Add "View Crate Graph (Full)"
2021-07-02 00:10:33 +02:00
bors[bot]
0331d19f42
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>
2021-07-01 19:52:14 +00:00
Lukas Wirth
81762024b5
Add goto_type_action
for field hovers
2021-07-01 21:51:26 +02:00
bors[bot]
564fa0146e
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>
2021-07-01 19:33:53 +00:00
Lukas Wirth
7c8ef301ca
Add ModuleOrItem guess to import granularity guessing
2021-07-01 21:32:35 +02:00
Lukas Wirth
3d2490ca97
Simplify
2021-07-01 21:10:45 +02:00
Jonas Schievink
cee9a7e26a
Bind the right number of variables in the FnPointer
2021-07-01 20:54:25 +02:00
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
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
Jonas Schievink
33d5793f19
Add a simpler legacy macro scoping test
2021-07-01 17:28:42 +02: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
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
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
Jonas Schievink
3ebceb71e3
Handle ::{self}
imports
2021-06-28 20:13:33 +02:00
Lukas Wirth
254e8f38d0
Record attributes in attr_query for proc-macros
2021-06-28 19:16:38 +02: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
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
Laurențiu Nicola
cc54d2bbc6
Avoid redundant clone
2021-06-28 09:28:31 +03:00
Lukas Wirth
3ce5c66ca1
Deduplicate ast expression walking logic
2021-06-27 01:11:57 +02:00
Aleksey Kladov
93e3659194
intenral: small improvements to compile time
...
AsRef-polymorphism has compile-time cost.
2021-06-25 23:51:54 +03: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
Lukas Wirth
942eeb2f55
Fix renaming associated trait items with colliding names
2021-06-25 03:45:41 +02:00
bors[bot]
c8d0ca8080
Merge #9398
...
9398: minor: Complete `macro_use` attribute on modules r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 20:21:20 +00:00
Lukas Wirth
63b1394b70
Complete macro_use
attribute on modules
2021-06-24 22:20:56 +02:00
bors[bot]
83fc0db7e2
Merge #9397
...
9397: fix: Fix break point highlighting not considering outer labels r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 19:15:59 +00:00
Lukas Wirth
67075b228e
Fix break point highlighting not considering outer labels
2021-06-24 21:14:43 +02:00
bors[bot]
0f0dbdc7d1
Merge #9396
...
9396: feat: Highlight loop break points r=Veykril a=Veykril
![Code_HmWQMlioKr](https://user-images.githubusercontent.com/3757771/123318732-d47be280-d52f-11eb-8a9a-cb3f591d4195.png )
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 19:05:41 +00:00
Lukas Wirth
42efd211bc
Highlight label value block tails
2021-06-24 21:01:37 +02:00
Lukas Wirth
543f925353
Highlight loop break points
2021-06-24 20:57:02 +02:00
bors[bot]
264716e827
Merge #9375
...
9375: feat: Highlight exit and yield points r=Veykril a=Veykril
![Code_YBHOCF3DbU](https://user-images.githubusercontent.com/3757771/123128986-e1270a80-d44b-11eb-9854-065459a2dd50.png )
![Code_YyMhqES0LX](https://user-images.githubusercontent.com/3757771/123128988-e1bfa100-d44b-11eb-9c81-6a6031aad740.png )
Fixes #4691
Fixes #9365
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-24 15:23:25 +00:00
Lukas Wirth
d77655e5c3
Refine tail exit point highlighting to highlight inner tails
2021-06-24 17:19:27 +02:00
Lukas Wirth
d049783b5d
Simplify
2021-06-24 16:50:56 +02:00
Lukas Wirth
066bc4f3a4
Simplify
2021-06-24 01:32:56 +02:00
bors[bot]
b656751536
Merge #9380
...
9380: feat: Implement goto_declaration support r=matklad a=Veykril
This is just a simple implementation that falls back to `goto_definition` for everything but modules where it goes to the actual module declaration if possible.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-23 22:33:05 +00:00
Lukas Wirth
37d417868e
move goto_declaration fall back into handlers
2021-06-24 00:26:08 +02:00
bors[bot]
85a59de39f
Merge #9353
...
9353: Include extra targets when the pkg_root is not the same as the target root. r=matklad a=rezural
Fixes #7715
For example, if a sub-crate includes sets the path='../somewhere-else/lib.rs', the files will not be in pkg_root , but in the target root's parent.
It may actually be in root.parent().parent(), I'm not sure about that.
At the moment it is just a fix, are there any relevant tests that this could go in? I've got about 1 brain cell left... but im happy to add tests where appropriate.
Co-authored-by: rezural <rezural@protonmail.com>
2021-06-23 21:33:30 +00:00
bors[bot]
1deb1d3209
Merge #9390
...
9390: fix: Improve type bound completions r=Veykril a=Veykril
Closes #9389
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-23 17:14:37 +00:00
Lukas Wirth
85736f2dc9
Fix incorrect base fixture in ide_completion tests
2021-06-23 19:13:27 +02:00
Lukas Wirth
9abd28ac37
Restrict type bound completions to traits, modules and macros
2021-06-23 19:10:03 +02:00
Lukas Wirth
d4877ae992
Add predicate tests for ide_completions
2021-06-23 18:58:19 +02:00
Lukas Wirth
dc4876d33d
Lift out base item fixture for ide_completion tests
2021-06-23 18:37:47 +02:00
Lukas Wirth
511ae17d07
Improve feature docs for highlight_related
2021-06-23 18:11:48 +02:00
Lukas Wirth
f283fce594
Mark (method-)calls with never type as exit points
2021-06-23 17:21:47 +02:00
Lukas Wirth
cc791538d6
Simplify
2021-06-23 17:05:00 +02:00
Lukas Wirth
12266d5e56
Strip leading whitespace from test ouput in references
2021-06-23 16:49:36 +02:00
Lukas Wirth
e406140f38
Implement exit point highlighting
2021-06-23 16:43:53 +02:00
Lukas Wirth
9a53f1033e
Implement yield point highlighting
2021-06-23 16:16:32 +02:00
Lukas Wirth
14b66bb458
Rename 'document_highlight' to 'highlight_related'
2021-06-23 15:13:48 +02:00
Lukas Wirth
b26a8ecca1
Move document highlighting computation from rust-analyzer to ide
2021-06-23 15:02:49 +02:00
Aramis Razzaghipour
3e7472f76c
Add public
semantic token modifier for public items
2021-06-23 09:40:04 +10:00
Jonas Schievink
c6669776e1
Rewrite convert_tokens
to use an explicit stack
2021-06-23 00:21:11 +02:00
Jonas Schievink
6504c3c32a
Move subtree collection out of TokenConvertor
2021-06-23 00:19:54 +02:00
Florian Diebold
c61fee6d55
Fix compilation on WASM
...
Fixes #9214 .
Fixes #9210 .
2021-06-22 22:01:06 +02:00
Lukas Wirth
5a74e93c33
Implement goto_declaration support
2021-06-22 20:49:07 +02:00
Aleksey Kladov
7be2d2f008
internal: remove one more accidentally quadratic code-path
...
Definition::visibility was implemented in a rather roundabout way -- by
asking the parent module about the effective visibility.
This is problematic for a couple of reasons:
* first, it doesn't work for local items
* second, asking module about visibility of a child is a linear
operation (that's a problem in itself, tracked in #9378 )
Instead, lets ask the declared visibility directly, we have all the code
for it, and need only to actually us it.
2021-06-22 21:26:07 +03:00
Aleksey Kladov
260a24d05e
internal: count ItemScopes
2021-06-22 21:02:08 +03:00
Aleksey Kladov
4772cb6b30
minor: clarify naming
2021-06-22 20:56:52 +03:00
bors[bot]
16d83ccbe2
Merge #9374
...
9374: Update crates r=kjeremy a=kjeremy
Drops byteorder
Co-authored-by: kjeremy <kjeremy@gmail.com>
2021-06-22 17:24:57 +00:00
kjeremy
5b6e168928
Update crates
2021-06-22 13:18:48 -04:00
Lukas Wirth
f615efdfc3
Factor out pick_best_token
ide pattern into ide_db
2021-06-22 17:50:15 +02:00
Aleksey Kladov
9526c198f6
intenral: dont export impl details
2021-06-22 16:53:53 +03:00
Aleksey Kladov
2860f25ef3
minor: extend source_to_def docs
2021-06-22 16:12:01 +03:00
Aleksey Kladov
bf9ce9e65c
internal: document source_to_def and it's connection to Kotlin&Roslyn
2021-06-22 15:31:04 +03:00
bors[bot]
ff92afb4c1
Merge #9368
...
9368: fix: Prefer identifier tokens in expand_macro r=Veykril a=Veykril
Fixes #9366
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-22 10:06:34 +00:00
Lukas Wirth
b423c61ce6
Prefer identifier tokens in expand_macro
2021-06-22 12:03:51 +02:00
bors[bot]
e2ca2325f5
Merge #9367
...
9367: Document perf characteristic of to_node r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-22 08:46:01 +00:00
Aleksey Kladov
e611c6758c
Document perf characteristic of to_node
2021-06-22 11:45:22 +03:00
rezural
f55b1d1e19
add extra include paths, if target's path is manually set in Cargo.toml to be
2021-06-22 08:59:57 +10:00
bors[bot]
37dc2dfada
Merge #9348
...
9348: output to log file if RA_LOG_FILE is defined in environment r=rezural a=rezural
This adds a check for RA_LOG_FILE, and logs to that if defined. It currently overrides flags.log_file. If this is undesirable, I will add a check.
Co-authored-by: rezural <rezural@protonmail.com>
2021-06-21 21:42:02 +00:00