Aleksey Kladov
3836b195dd
minor: replace panics with types
2022-01-02 19:05:37 +03:00
Aleksey Kladov
174c439c56
minor: drop dead code
2022-01-02 19:03:38 +03:00
Aleksey Kladov
2e34a5e2e9
add empty input tests
2022-01-02 18:50:32 +03:00
Aleksey Kladov
c72908a201
more intuitive order
2022-01-02 18:46:01 +03:00
Aleksey Kladov
d846afdeef
check top level entry point invariants
2022-01-02 18:41:32 +03:00
Aleksey Kladov
fa049d94d1
add top-level tests for expressions
2022-01-02 17:52:05 +03:00
Aleksey Kladov
640cc27ff0
add top level tests for types
2022-01-02 17:45:18 +03:00
Aleksey Kladov
e78424846e
enforce parsing invariant for patterns
2022-01-02 17:32:15 +03:00
Aleksey Kladov
7989d567e2
internal: more macro tests
2022-01-02 17:18:21 +03:00
Aleksey Kladov
7de4b964a9
add test for macro items
2022-01-02 16:48:10 +03:00
Aleksey Kladov
bebfb83fd0
split prefix/top tests
2022-01-02 15:18:34 +03:00
Aleksey Kladov
2bd7c74706
add tests for macro statements
2022-01-02 15:17:32 +03:00
Aleksey Kladov
f2ea7853ee
start top-level entry point tests
2022-01-02 15:15:04 +03:00
Aleksey Kladov
e366b3c730
minor: generalize
2022-01-02 15:01:20 +03:00
Lukas Wirth
8fad24d3c2
minor: Simplify
2022-01-02 12:40:46 +01:00
Laurențiu Nicola
53ddf48df4
Avoid collect_vec from itertools
2022-01-02 12:06:14 +02:00
Laurențiu Nicola
fdf1136e79
Replace folds with for loops
2022-01-02 12:05:35 +02:00
Lukas Wirth
65a1538dd1
internal: Use basic NonEmptyVec in mbe::syntax_bridge
2022-01-02 03:48:19 +01:00
Lukas Wirth
a0e0e4575b
Simplify
2022-01-02 02:39:14 +01:00
Lukas Wirth
809461cc42
fix: Enable completions for <_>::$0
2022-01-01 22:20:03 +01:00
Lukas Wirth
44d61766b5
internal: Record unresolved derive invocations in hir
2022-01-01 20:43:25 +01:00
bors[bot]
0e5d8883cc
Merge #11153
...
11153: internal: add more prefix entry point tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2022-01-01 17:04:29 +00:00
Aleksey Kladov
e36f557e4d
internal: add more prefix entry point tests
2022-01-01 20:04:09 +03:00
bors[bot]
3f2edc72cd
Merge #11136
...
11136: Turbo fish assist supports multiple type arguments r=matklad a=Vannevelj
This fixes #11135 (changelog: bug).
I've only started using Rust a few days ago but saw this issue on the top of the list when I looked at this repo. I based myself on [this blog post](https://techblog.tonsser.com/posts/what-is-rusts-turbofish ) to understand what a "turbo fish" is so let me know if I missed anything.
Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
2022-01-01 16:42:22 +00:00
bors[bot]
9c210a49b6
Merge #11151
...
11151: feat: correctly fallback to notify if the clinet-side file watching is not supported r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2022-01-01 16:17:39 +00:00
Aleksey Kladov
a1c33c2e1a
test: force client-side watching
...
The direct reason for this is to fix CI on windows, which seems to fail
for some reason after we fixed the watcher-selection logic which (I
think) changed the tests behavior to use notify rather than client.
But this patch seems to make sense in general -- file watching is
notoriously finicky, so controlling it explicitly leads to less fragile
tests.
2022-01-01 19:16:25 +03:00
Aleksey Kladov
7c4276b3e1
add path tests
2022-01-01 19:02:47 +03:00
Aleksey Kladov
287e748aa9
add expr tests
2022-01-01 18:58:30 +03:00
Aleksey Kladov
58fa7ce782
tests for ty
2022-01-01 18:58:30 +03:00
Aleksey Kladov
5ca83a5fb3
internal: add tests for patterns
2022-01-01 18:58:30 +03:00
Aleksey Kladov
0d1e23e968
better error message
2022-01-01 18:55:53 +03:00
Aleksey Kladov
b9417f3483
feat: correctly fallback to notify if the clinet-side file watching is not supported
2022-01-01 17:26:54 +03:00
bors[bot]
22ccb1a104
Merge #11141
...
11141: internal: add tests for extra parser entry points r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-12-30 10:30:28 +00:00
Ariel Davis
d4262f4af8
Migrate to SyntaxNodePtr in new rowan
2021-12-29 23:48:53 -08:00
Aleksey Kladov
2f3237912d
restore invariatns
2021-12-29 20:37:08 +03:00
Aleksey Kladov
b5369927d7
parse empty statemet as statemetn
2021-12-29 20:04:36 +03:00
Aleksey Kladov
841cd30b45
Add test
2021-12-29 19:37:35 +03:00
Aleksey Kladov
f5cfc0504e
rename
2021-12-29 19:18:34 +03:00
Aleksey Kladov
8234a85d15
compress
2021-12-29 18:51:05 +03:00
Aleksey Kladov
ad4b02ecc0
add automated semicolon insertion test
2021-12-29 18:37:06 +03:00
Aleksey Kladov
3f5fc05d66
internal: add tests for extra parser entry points
2021-12-29 18:28:11 +03:00
Jeroen Vannevel
b04c4e76df
formatting
2021-12-28 18:52:12 +00:00
Jeroen Vannevel
e299fd5475
turbo fish supports multiple type arguments
2021-12-28 18:41:34 +00:00
Aleksey Kladov
ea96c376c8
compress
2021-12-28 19:17:34 +03:00
Aleksey Kladov
660cf34d8c
dead code
2021-12-28 19:13:30 +03:00
Aleksey Kladov
bfc263f1f9
introduce hacks module
2021-12-28 18:57:13 +03:00
Aleksey Kladov
aa1788dc71
clarify semantics of doc links
2021-12-28 17:00:55 +03:00
Aleksey Kladov
f9e06e6524
last use of parse api in ssr
2021-12-28 17:00:55 +03:00
Aleksey Kladov
45bba40079
dead code
2021-12-28 17:00:55 +03:00
Aleksey Kladov
55f1564101
remove fragments from syntax
2021-12-28 17:00:55 +03:00
Aleksey Kladov
dacbc6a69a
move the rest of ssr parsing to fragments
2021-12-28 17:00:55 +03:00
Aleksey Kladov
7e9c74d20b
drop dead code
2021-12-28 17:00:55 +03:00
Aleksey Kladov
2cbfcf431e
add ssr fragment for statements
2021-12-28 17:00:55 +03:00
Aleksey Kladov
df2a996cb0
add ssr fragment for expressions
2021-12-28 17:00:55 +03:00
Aleksey Kladov
2d373dc53c
verify during parse
2021-12-28 17:00:55 +03:00
Aleksey Kladov
b8b9655236
add test
2021-12-28 17:00:55 +03:00
Aleksey Kladov
f0fefde401
remove Item::parse
2021-12-28 17:00:55 +03:00
Aleksey Kladov
b468bd6645
internal: start isolating ssr-related parsing APIs to SSR
2021-12-28 17:00:55 +03:00
Aleksey Kladov
634c7682c9
add missing test
2021-12-28 17:00:55 +03:00
Aleksey Kladov
8794892432
dead code
2021-12-28 17:00:55 +03:00
Aleksey Kladov
afffa096f6
add TopEntryPoint
2021-12-28 17:00:55 +03:00
Aleksey Kladov
8e7fc7be65
simplify
2021-12-28 17:00:55 +03:00
Aleksey Kladov
369001615f
move path
2021-12-28 17:00:55 +03:00
Aleksey Kladov
c5d8a9b341
move expr
2021-12-28 17:00:55 +03:00
Aleksey Kladov
04ae18de29
move ty
2021-12-28 17:00:55 +03:00
Aleksey Kladov
5636bef2ec
move pat to prefix entry points
2021-12-28 17:00:55 +03:00
Aleksey Kladov
f10f51833c
move stmt to entry points
2021-12-28 17:00:55 +03:00
Aleksey Kladov
519ee21bcb
internal: move block to prefix entry point
2021-12-28 17:00:55 +03:00
Aleksey Kladov
350d5dc152
internal: move visibility to a prefix entry point
2021-12-28 17:00:55 +03:00
Aleksey Kladov
abc658aad0
internal: add prefix entry points
2021-12-28 17:00:55 +03:00
Aleksey Kladov
d3ba55bd06
cleanup imports
2021-12-28 17:00:55 +03:00
Aleksey Kladov
23ce31e836
simplify
2021-12-28 17:00:55 +03:00
bors[bot]
4d3ad04a9c
Merge #11131
...
11131: internal: avoid speculation when completing macros r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-12-28 13:52:52 +00:00
Aleksey Kladov
177a183e85
minor: simplify
2021-12-28 16:52:15 +03:00
Aleksey Kladov
56b51852c2
minor: dedup
2021-12-28 16:52:15 +03:00
Aleksey Kladov
726da9884b
avoid speculation when completing macros
2021-12-28 16:52:15 +03:00
Aleksey Kladov
621ba1c2d3
import style
2021-12-28 13:52:40 +03:00
Aleksey Kladov
42ff46c1e8
minor
2021-12-27 21:45:42 +03:00
Aleksey Kladov
8e9734e18f
fix line endings
2021-12-26 18:46:21 +03:00
Aleksey Kladov
b360ea91f2
internal: move inline parser tests to parser crate
2021-12-26 18:19:09 +03:00
Aleksey Kladov
0f74758fea
internal: move outlined parser tests
2021-12-26 17:58:33 +03:00
Aleksey Kladov
f4cb0ff9be
internal: move ws attachment logic to the parser crate
...
This has to re-introduce the `sink` pattern, because doing this purely
with iterators is awkward :( Maaaybe the event vector was a false start?
But, anyway, I like the current factoring more -- it sort-of obvious
that we do want to keep ws-attachment business in the parser, and that
we also don't want that to depend on the particular tree structure. I
think `shortcuts` module achieves that.
2021-12-26 16:47:10 +03:00
Aleksey Kladov
f692fafee8
rename
2021-12-25 22:03:57 +03:00
Aleksey Kladov
74de79b1da
internal: rename
2021-12-25 22:02:26 +03:00
Aleksey Kladov
d0d05075ed
internal: replace TreeSink with a data structure
...
The general theme of this is to make parser a better independent
library.
The specific thing we do here is replacing callback based TreeSink with
a data structure. That is, rather than calling user-provided tree
construction methods, the parser now spits out a very bare-bones tree,
effectively a log of a DFS traversal.
This makes the parser usable without any *specifc* tree sink, and allows
us to, eg, move tests into this crate.
Now, it's also true that this is a distinction without a difference, as
the old and the new interface are equivalent in expressiveness. Still,
this new thing seems somewhat simpler. But yeah, I admit I don't have a
suuper strong motivation here, just a hunch that this is better.
2021-12-25 22:02:26 +03:00
rainy-me
d77d3234ce
refactor: avoid filter map next with find map separate traversal
2021-12-25 09:08:13 +09:00
hkalbasi
e6139cf47b
show values of constants in hover
2021-12-23 17:53:46 +03:30
Heinenen
05abfc77f5
hide type inlay hints
2021-12-23 12:56:38 +01:00
Heinenen
d7dfe93fc3
hide type inlay hints for enum variant constructors and tuple struct constructors
2021-12-23 12:56:38 +01:00
Wang Ruochen
be5205170c
Update comment
2021-12-22 14:17:43 -08:00
Wang Ruochen
44edf63edd
Add pattern when there's no else branch
2021-12-22 10:18:37 -08:00
bors[bot]
578269e613
Merge #11093
...
11093: fix: Do not complete `Drop::drop`, complete `std::mem::drop` instead r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5005
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-22 01:48:31 +00:00
Lukas Wirth
85ed5a3182
Make hover test not relient on minicore structure
2021-12-22 02:36:31 +01:00
Lukas Wirth
5360c9bd22
fix: Do not complete Drop::drop
, complete std::mem::drop
instead
2021-12-22 02:25:38 +01:00
Wang Ruochen
2bd2960fda
Don't support if-let branches
2021-12-21 16:51:26 -08:00
Wang Ruochen
d0986cd96b
Move variables into the closure
2021-12-21 16:48:02 -08:00
bors[bot]
d4c5bf7828
Merge #11092
...
11092: internal: Directly use self param in completions instead of searching r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-21 23:20:16 +00:00
Lukas Wirth
276687a6ee
internal: Directly use self param in completions instead of searching
2021-12-22 00:18:39 +01:00
bors[bot]
47fad0ed73
Merge #11071 #11090
...
11071: feat: Build and publish pre-release Code extension versions r=matklad a=lnicola
Closes #11026
11090: internal: Deduplicate lower ctx hygiene field r=Veykril a=Veykril
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-21 17:37:56 +00:00
Lukas Wirth
e76e0e843d
Simplify
2021-12-21 18:28:04 +01:00