Commit Graph

19626 Commits

Author SHA1 Message Date
bors[bot]
ce86534e1c
Merge #10499
10499: feat: be more precise in mismatch arg counts highlighting r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-09 19:46:47 +00:00
Aleksey Kladov
a85a3d73ed feat: be more precise in mismatch arg counts highlighting 2021-10-09 22:45:54 +03:00
bors[bot]
6005ea5440
Merge #10497
10497: internal: move tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-09 16:11:30 +00:00
Aleksey Kladov
de136a5340 move test 2021-10-09 19:11:04 +03:00
Aleksey Kladov
e838da18a9 internal: move tests 2021-10-09 18:54:15 +03:00
Aleksey Kladov
0dc87badd7 internal: move test 2021-10-09 18:51:26 +03:00
Aleksey Kladov
0a32c20142 internal: move test 2021-10-09 18:49:14 +03:00
Aleksey Kladov
993ff1c239 internal: drop duplicated test 2021-10-09 18:47:04 +03:00
Aleksey Kladov
419c234333 internal: move test 2021-10-09 18:46:16 +03:00
Aleksey Kladov
b1cfa51ef5 internal: move tests 2021-10-09 18:43:15 +03:00
bors[bot]
b2b703b2d7
Merge #10496
10496: internal: move some macro tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-09 15:19:39 +00:00
Aleksey Kladov
3e8ef943c6 internal: move some tests 2021-10-09 18:18:56 +03:00
Aleksey Kladov
a060b9a4b2 internal: move some macro tests 2021-10-09 18:15:05 +03:00
Aleksey Kladov
c2e425dd00 internal: make sure macro test expand to valid syntax 2021-10-09 18:06:24 +03:00
Aleksey Kladov
c41b7bbe69 internal: allow macro tests to inspect parse tree 2021-10-09 17:58:17 +03:00
Aleksey Kladov
aac23f7832 move tests 2021-10-09 17:43:07 +03:00
Aleksey Kladov
6407e2e789 indent macro output when pprinting 2021-10-09 17:36:41 +03:00
Aleksey Kladov
a0d9e78ec3 align tests to code style 2021-10-09 17:31:24 +03:00
Aleksey Kladov
036c0ff8c7 move some tests 2021-10-09 17:27:38 +03:00
Aleksey Kladov
cb1b6a273f internal: don't un-indent macro tests manually 2021-10-09 17:17:37 +03:00
Aleksey Kladov
afacdd612d internal: update expect 2021-10-09 17:17:16 +03:00
bors[bot]
9f7bf0aebe
Merge #10495
10495: internal: move some mbe tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-09 13:32:11 +00:00
Aleksey Kladov
959da8caa1 internal: move test 2021-10-09 16:31:26 +03:00
Aleksey Kladov
59c86ff300 rename 2021-10-09 16:28:11 +03:00
Aleksey Kladov
75b0ce17cf move test 2021-10-09 16:27:19 +03:00
Aleksey Kladov
0dd1b35479 move test 2021-10-09 16:25:37 +03:00
Aleksey Kladov
574df660e4 move test 2021-10-09 16:22:42 +03:00
Aleksey Kladov
b21244e080 internal: move test 2021-10-09 16:19:19 +03:00
bors[bot]
26f4124b26
Merge #10494
10494: Macro expansion tests r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-10-09 12:30:27 +00:00
Aleksey Kladov
84d182c7a2 internal: docs 2021-10-09 15:29:31 +03:00
Aleksey Kladov
ef1251f696 feat: report errors in macro definition
Reporting macro *definition* error at the macro *call site* is a rather
questionable approach, but at least we don't erase the errors
altogether!
2021-10-09 15:23:55 +03:00
Aleksey Kladov
b3d1de93af get organizized 2021-10-09 14:53:15 +03:00
Aleksey Kladov
8e9003447c future proof structure 2021-10-09 14:48:38 +03:00
Aleksey Kladov
5ecda802f1 move test 2021-10-09 14:45:52 +03:00
Aleksey Kladov
f4ee0d736c move tests 2021-10-09 14:39:24 +03:00
Aleksey Kladov
1abe3f8275 internal: move tests 2021-10-09 14:22:49 +03:00
Aleksey Kladov
49f5fecf06 internal: move test 2021-10-09 14:18:53 +03:00
Aleksey Kladov
78ca43ef3d internal: move test 2021-10-09 13:51:02 +03:00
Aleksey Kladov
093f99b809 internal: start new macro test suite
I don't like our macro tests -- they are brittle and don't inspire
confidence. I think the reason for that is that we try to unit-test
them, but that is at odds with reality, where macro expansion
fundamentally depends on name resolution.
2021-10-09 13:42:32 +03:00
bors[bot]
545b068a77
Merge #10474
10474: feat: Support `let...else` r=jonas-schievink a=jonas-schievink

bors r+

closes https://github.com/rust-analyzer/rust-analyzer/issues/10469

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-10-07 15:09:42 +00:00
Jonas Schievink
f8acae7895 Support let...else 2021-10-07 17:06:24 +02:00
bors[bot]
4675410f07
Merge #10477 #10482
10477: parser: fix parsing of macro call inside generic args r=Veykril a=cynecx



10482: fix: fix `inline_call` trying to use an uncached syntax node in Semantics r=Veykril a=Veykril

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

Co-authored-by: cynecx <me@cynecx.net>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-07 13:05:18 +00:00
Lukas Wirth
12465a8a3c Expose HasSource::source through Semantics with caching behaviour 2021-10-07 15:00:14 +02:00
bors[bot]
5191fb755b
Merge #10480
10480: fix: Change `stdx::to_snake_case` to match rustc implementation r=Veykril a=Crauzer

Fixes #10473

Co-authored-by: crauzer <filip.quitko@gmail.com>
2021-10-07 12:56:28 +00:00
bors[bot]
fd3f4c50da
Merge #10467
10467: Optimize CodeLens for references/impls r=Veykril a=ericsampson

Don't do unnecessary work.
Followup to #10447 . cc `@Veykril` 

Co-authored-by: Eric Sampson <esampson@eaze.com>
2021-10-06 21:47:22 +00:00
Eric Sampson
efca421c43 Refactor to eliminate a vector allocation. 2021-10-06 16:43:37 -05:00
crauzer
ba62a8a075 fix test 2021-10-06 23:37:43 +02:00
crauzer
a4f08c117f Fix stdx::to_snake_case 2021-10-06 23:24:47 +02:00
bors[bot]
f30b62b751
Merge #10479
10479: fix: fix "index out of bounds" panic in name resolution r=jonas-schievink a=jonas-schievink

Closes https://github.com/rust-analyzer/rust-analyzer/issues/10084
Closes https://github.com/rust-analyzer/rust-analyzer/issues/9163

This is really just a salsa update to a version that removes the problematic code (see https://github.com/rust-analyzer/rust-analyzer/issues/10084#issuecomment-934445711)

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-10-06 20:54:27 +00:00
bors[bot]
12d33eafaf
Merge #10476
10476: feat: Add `replace_try_expr_with_match` assist r=Veykril a=Crauzer

Adds the replace_try_expr_with_match assist
#10424

Co-authored-by: crauzer <filip.quitko@gmail.com>
2021-10-06 20:45:14 +00:00