]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoMerge #10211
bors[bot] [Sat, 25 Sep 2021 15:32:00 +0000 (15:32 +0000)]
Merge #10211

10211: assists: Promote module to folder r=jonas-schievink a=longfangsong

Close part of #10143.

This PR adds a assist to promote module to directory, which means make a .rs file module into a directory style module with the same name.

![未命名(1)](https://user-images.githubusercontent.com/13777628/132958377-14555d6f-a64a-4b9b-9154-90a3b86fd685.gif)

Co-authored-by: longfangsong <longfangsong@icloud.com>
2 years agoMerge #10350
bors[bot] [Sat, 25 Sep 2021 15:09:34 +0000 (15:09 +0000)]
Merge #10350

10350: simplify attribute parsing r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agosimplify attribute parsing
Aleksey Kladov [Sat, 25 Sep 2021 15:07:51 +0000 (18:07 +0300)]
simplify attribute parsing

2 years agoAddress comments
longfangsong [Sat, 25 Sep 2021 14:47:20 +0000 (22:47 +0800)]
Address comments

2 years agoMerge #10347
bors[bot] [Sat, 25 Sep 2021 12:11:37 +0000 (12:11 +0000)]
Merge #10347

10347: minor: Update `semanticTokenModifiers` in package.json r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoUpdate `semanticTokenModifiers` in package.json
Lukas Wirth [Sat, 25 Sep 2021 12:10:46 +0000 (14:10 +0200)]
Update `semanticTokenModifiers` in package.json

2 years agoMerge #10346
bors[bot] [Sat, 25 Sep 2021 11:56:23 +0000 (11:56 +0000)]
Merge #10346

10346: minor: align code with code-style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: align code with code-style
Aleksey Kladov [Sat, 25 Sep 2021 11:55:42 +0000 (14:55 +0300)]
minor: align code with code-style

2 years agoMerge #10345
bors[bot] [Sat, 25 Sep 2021 11:37:30 +0000 (11:37 +0000)]
Merge #10345

10345: minore: improve consistency r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominore: improve consistency
Aleksey Kladov [Sat, 25 Sep 2021 11:36:46 +0000 (14:36 +0300)]
minore: improve consistency

2 years agominor: more condensed tests
Aleksey Kladov [Sat, 25 Sep 2021 11:24:08 +0000 (14:24 +0300)]
minor: more condensed tests

2 years agoMerge #10344
bors[bot] [Sat, 25 Sep 2021 11:20:54 +0000 (11:20 +0000)]
Merge #10344

10344: minor: link my own pratt parsing article :-) r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: link my own pratt parsing article :-)
Aleksey Kladov [Sat, 25 Sep 2021 11:18:59 +0000 (14:18 +0300)]
minor: link my own pratt parsing article :-)

2 years agoMerge #10343
bors[bot] [Sat, 25 Sep 2021 11:11:33 +0000 (11:11 +0000)]
Merge #10343

10343: internal: parser cleanups r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: add => () rule; emphasize `n_items` rule
Aleksey Kladov [Sat, 25 Sep 2021 11:10:25 +0000 (14:10 +0300)]
internal: add => () rule; emphasize `n_items` rule

2 years agominor: more focusted tests
Aleksey Kladov [Sat, 25 Sep 2021 11:02:33 +0000 (14:02 +0300)]
minor: more focusted tests

2 years agominor: more readable code
Aleksey Kladov [Sat, 25 Sep 2021 10:27:53 +0000 (13:27 +0300)]
minor: more readable code

2 years agoMerge #10339
bors[bot] [Fri, 24 Sep 2021 19:18:15 +0000 (19:18 +0000)]
Merge #10339

10339: fix: Fix item-level macro errors (eg. `compile_error!`) r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8459

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoFix item-level lazy macro errors
Jonas Schievink [Fri, 24 Sep 2021 19:17:25 +0000 (21:17 +0200)]
Fix item-level lazy macro errors

2 years agoMerge #10338
bors[bot] [Fri, 24 Sep 2021 18:42:44 +0000 (18:42 +0000)]
Merge #10338

10338: fix: Fix diagnostics in unnamed consts r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoFix diagnostics in unnamed consts
Jonas Schievink [Fri, 24 Sep 2021 18:41:24 +0000 (20:41 +0200)]
Fix diagnostics in unnamed consts

2 years agoMerge #10334
bors[bot] [Fri, 24 Sep 2021 17:07:18 +0000 (17:07 +0000)]
Merge #10334

10334: Give rustfmt spawn error context. r=jonas-schievink a=aDotInTheVoid

This mean if you misconfigure to

```json
{
    "rust-analyzer.rustfmt.overrideCommand": [
        "./nonono"
    ]
}
```

The error message is

```
[Error - 17:54:33] Request textDocument/formatting failed.
  Message: Failed to spawn "./nonono"
  Code: -32603
```

instead of

```
[Error - 17:56:12] Request textDocument/formatting failed.
  Message: No such file or directory (os error 2)
  Code: -32603
```

I'm not sure how to test this, or if it needs a test.

Co-authored-by: Nixon Enraght-Moony <nixon.emoony@gmail.com>
2 years agoMerge #10335
bors[bot] [Fri, 24 Sep 2021 16:57:37 +0000 (16:57 +0000)]
Merge #10335

10335: internal: Avoid some `Arc` cloning r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoAvoid some `Arc` cloning
Jonas Schievink [Fri, 24 Sep 2021 16:57:08 +0000 (18:57 +0200)]
Avoid some `Arc` cloning

2 years agoGive rustfmt spawn error context.
Nixon Enraght-Moony [Fri, 24 Sep 2021 16:51:47 +0000 (17:51 +0100)]
Give rustfmt spawn error context.

2 years agoMerge #10105
bors[bot] [Fri, 24 Sep 2021 15:12:17 +0000 (15:12 +0000)]
Merge #10105

10105: RfC: Use `todo!()` instead of `()` for missing fields r=jonas-schievink a=jo-so

Most commonly a field of a struct can be initialized with its default value than an empty tuple.

Co-authored-by: Jörg Sommer <joerg@jo-so.de>
2 years agoMerge #10332
bors[bot] [Fri, 24 Sep 2021 14:59:02 +0000 (14:59 +0000)]
Merge #10332

10332: minor: Allow overwriting RUST_BACKTRACE for the server manually r=jonas-schievink a=Veykril

Trying to figure out why we aren't getting backtraces for windows builds from CI, this let's one set the backtraces to `FULL`
Might be cc https://github.com/rust-lang/rust/issues/87481
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMerge #10331
bors[bot] [Fri, 24 Sep 2021 14:51:19 +0000 (14:51 +0000)]
Merge #10331

10331: minor: Include macro path in eager macro resolve error r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2 years agoMerge #10329
bors[bot] [Fri, 24 Sep 2021 14:02:16 +0000 (14:02 +0000)]
Merge #10329

10329: Fix link to "Auto Import" r=lnicola a=carlos-menezes

https://github.com/rust-analyzer/rust-analyzer.github.io/pull/147#issuecomment-926600543

Co-authored-by: Carlos Menezes <carlos-menezes212@hotmail.com>
2 years agoAdd missing files
Carlos Menezes [Fri, 24 Sep 2021 13:53:11 +0000 (14:53 +0100)]
Add missing files

2 years agoAllow setting RUST_BACKTRACE for the server manually
Lukas Wirth [Fri, 24 Sep 2021 13:38:00 +0000 (15:38 +0200)]
Allow setting RUST_BACKTRACE for the server manually

2 years agoInclude macro path in eager macro resolve error
Jonas Schievink [Fri, 24 Sep 2021 13:34:57 +0000 (15:34 +0200)]
Include macro path in eager macro resolve error

2 years agoFix link to "Auto Import"
Carlos Menezes [Fri, 24 Sep 2021 12:59:44 +0000 (13:59 +0100)]
Fix link to "Auto Import"

2 years agoMerge #10328
bors[bot] [Fri, 24 Sep 2021 12:21:12 +0000 (12:21 +0000)]
Merge #10328

10328: fix: Fix incorrect mod.rs handling in unlinked_file fixes r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoFix incorrect mod.rs handling in unlinked_file fixes
Lukas Wirth [Fri, 24 Sep 2021 12:20:43 +0000 (14:20 +0200)]
Fix incorrect mod.rs handling in unlinked_file fixes

2 years agoMerge #10322
bors[bot] [Thu, 23 Sep 2021 18:36:44 +0000 (18:36 +0000)]
Merge #10322

10322: internal: Split the hover module up r=Veykril a=Veykril

cc https://github.com/rust-analyzer/rust-analyzer/issues/10107
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSplit the hover module up
Lukas Wirth [Thu, 23 Sep 2021 17:54:57 +0000 (19:54 +0200)]
Split the hover module up

2 years agoMerge #10321
bors[bot] [Thu, 23 Sep 2021 18:06:08 +0000 (18:06 +0000)]
Merge #10321

10321: fix: Change the global setting when toggling inlay hints r=lnicola a=lnicola

Closes #10318

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 years agoMerge #10320
bors[bot] [Thu, 23 Sep 2021 17:56:55 +0000 (17:56 +0000)]
Merge #10320

10320: feat: Hover/GotoDef works in macro invocations and on doc attribute strings r=Veykril a=Veykril

![image](https://user-images.githubusercontent.com/3757771/134554781-b903d33d-674f-4ed4-8acb-71ff5913f1cb.png)
cc https://github.com/rust-analyzer/rust-analyzer/issues/10271

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoChange the global setting when toggling inlay hints
Laurențiu Nicola [Thu, 23 Sep 2021 17:45:45 +0000 (20:45 +0300)]
Change the global setting when toggling inlay hints

2 years agoSupport goto_def for intra-doc-links in macro invocations
Lukas Wirth [Thu, 23 Sep 2021 17:17:29 +0000 (19:17 +0200)]
Support goto_def for intra-doc-links in macro invocations

2 years agoMake hover work for intra doc links in macro invocations
Lukas Wirth [Thu, 23 Sep 2021 15:32:39 +0000 (17:32 +0200)]
Make hover work for intra doc links in macro invocations

2 years agoMerge #10319
bors[bot] [Thu, 23 Sep 2021 14:28:27 +0000 (14:28 +0000)]
Merge #10319

10319: internal: Cleanup hover a bit r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoCleanup
Lukas Wirth [Thu, 23 Sep 2021 13:37:52 +0000 (15:37 +0200)]
Cleanup

2 years agoMerge #10315
bors[bot] [Thu, 23 Sep 2021 04:55:34 +0000 (04:55 +0000)]
Merge #10315

10315: Fix title of User Manual page r=lnicola a=terrynsun

Asciidoc uses the first line of a doc as the title, so you can't put
comments before the heading.

---
I had an old copy of the Manual page open and I noticed that the "User Manual" heading (and page title) had disappeared in the live version:

![image](https://user-images.githubusercontent.com/2858750/134455658-3885b754-9eae-4dca-a6d4-4b1453910850.png)

With this change (and how it was a few days ago):

![image](https://user-images.githubusercontent.com/2858750/134455865-5acc7538-ccf8-4346-941f-3a5561b3181e.png)

Co-authored-by: Terry Sun <terrynsun@gmail.com>
2 years agoFix title of User Manual page
Terry Sun [Thu, 23 Sep 2021 04:37:17 +0000 (21:37 -0700)]
Fix title of User Manual page

Asciidoc uses the first line of a doc as the title, so you can't put
comments before the heading.

2 years agoMerge #10313
bors[bot] [Wed, 22 Sep 2021 20:04:30 +0000 (20:04 +0000)]
Merge #10313

10313: Mark large benchmark data files as binary to filter greps r=lnicola a=joshtriplett

When doing a git grep (of rust-analyzer or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the large
benchmark data files, the resulting long single lines can cause a text
pager or editor to slow down and distract from more useful matches.

These test data files aren't formatted for human consumption, so mark
them as binary, which causes git grep to instead just state that they
match without printing the matching "line".

Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2 years agoMark large benchmark data files as binary to filter greps
Josh Triplett [Wed, 22 Sep 2021 19:51:58 +0000 (12:51 -0700)]
Mark large benchmark data files as binary to filter greps

When doing a git grep (of rust-analyzer or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the large
benchmark data files, the resulting long single lines can cause a text
pager or editor to slow down and distract from more useful matches.

These test data files aren't formatted for human consumption, so mark
them as binary, which causes git grep to instead just state that they
match without printing the matching "line".

2 years agoMerge #10284
bors[bot] [Wed, 22 Sep 2021 15:23:23 +0000 (15:23 +0000)]
Merge #10284

10284: internal: definition based hover functions r=Veykril a=HKalbasi

This is part of #10181 but since it is blocked and `hover.rs` is moving quickly so will cause conflicts, I submitted this PR.

This PR extract some parts of `hover` to `find_definition` (maybe this need to be moved to some other file?) and `hover_for_definition`, with those functions I will be able to calculate definition of every token, and calculate hover (and probably other queries) for each definition only once.

Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2 years agomove function to defs.rs
hamidreza kalbasi [Wed, 22 Sep 2021 15:05:54 +0000 (18:35 +0330)]
move function to defs.rs

2 years agoremove dead code
hamidreza kalbasi [Wed, 22 Sep 2021 08:14:23 +0000 (11:44 +0330)]
remove dead code

2 years agouse find_definition in go to
hamidreza kalbasi [Wed, 22 Sep 2021 08:07:26 +0000 (11:37 +0330)]
use find_definition in go to

2 years agoMerge #10306
bors[bot] [Tue, 21 Sep 2021 22:54:56 +0000 (22:54 +0000)]
Merge #10306

10306: Generate function assist creates bad param names for const/static item args r=XFFXFF a=XFFXFF

Try to fix #10278

Co-authored-by: zhoufan <1247714429@qq.com>
2 years agoChange the style of the code
zhoufan [Tue, 21 Sep 2021 22:32:23 +0000 (06:32 +0800)]
Change the style of the code

2 years agoGenerate function assist creates bad param names for const/static item args
zhoufan [Tue, 21 Sep 2021 16:15:57 +0000 (00:15 +0800)]
Generate function assist creates bad param names for const/static item args

2 years agofix derive hover in macro
hamidreza kalbasi [Tue, 21 Sep 2021 15:25:57 +0000 (19:55 +0430)]
fix derive hover in macro

2 years agoMerge #10304
bors[bot] [Tue, 21 Sep 2021 14:15:53 +0000 (14:15 +0000)]
Merge #10304

10304: internal: Generate ast nodes for each ast trait r=Veykril a=Veykril

Generate a `DynTrait` node per ast trait that implements the trait itself as well as conversions via the `AstNode` trait. This is a trick already employed in `hir_def::attr` with `AttrsOwner` where it was manually implemented for.

This basically gives us stack trait objects for these(only useful for `hir_def::attr` currently) as well as simple conversions of `SyntaxNode` to a trait, in cases where only a result of a function call of such a trait is of interest.

It doesn't have many uses yet but as its autogenerated it doesn't add any maintenance costs.

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSimplify
Lukas Wirth [Tue, 21 Sep 2021 14:15:30 +0000 (16:15 +0200)]
Simplify

2 years agoSimplify
Lukas Wirth [Tue, 21 Sep 2021 13:56:06 +0000 (15:56 +0200)]
Simplify

2 years agoGenerate ast nodes for each ast trait
Lukas Wirth [Tue, 21 Sep 2021 13:52:11 +0000 (15:52 +0200)]
Generate ast nodes for each ast trait

2 years agoMerge #10303
bors[bot] [Tue, 21 Sep 2021 12:56:37 +0000 (12:56 +0000)]
Merge #10303

10303: internal: Add a mirror function-like proc-macro expander for tests r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoAdd a mirror function-like proc-macro expander for tests
Lukas Wirth [Tue, 21 Sep 2021 12:55:54 +0000 (14:55 +0200)]
Add a mirror function-like proc-macro expander for tests

2 years agoMerge #10301
bors[bot] [Tue, 21 Sep 2021 08:34:51 +0000 (08:34 +0000)]
Merge #10301

10301: minor: Merge iter_for_each_to_for and for_to_iter_for_each assists modules r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMerge iter_for_each_to_for and for_to_iter_for_each assists modules
Lukas Wirth [Tue, 21 Sep 2021 08:34:11 +0000 (10:34 +0200)]
Merge iter_for_each_to_for and for_to_iter_for_each assists modules

2 years agoMerge #10299
bors[bot] [Mon, 20 Sep 2021 22:54:39 +0000 (22:54 +0000)]
Merge #10299

10299: minor: Rename some assists r=Veykril a=Veykril

Trying to make our assist names a bit more uniform
`fill_match_arms` -> `add_missing_match_arms`
`infer_function_return_type` -> `add_return_type`
`replace_impl_trait_with_generic` -> `introduce_named_generic`
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoRename some assists
Lukas Wirth [Mon, 20 Sep 2021 21:53:05 +0000 (23:53 +0200)]
Rename some assists

2 years agoAddress comments
longfangsong [Mon, 20 Sep 2021 12:43:13 +0000 (20:43 +0800)]
Address comments

2 years agoMerge #10293
bors[bot] [Sun, 19 Sep 2021 22:33:42 +0000 (22:33 +0000)]
Merge #10293

10293: fix: Don't bail on parse errors in macro input for builtin expansion r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8158

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoDon't bail on parse errors in macro input for builtin expansion
Lukas Wirth [Sun, 19 Sep 2021 22:22:30 +0000 (00:22 +0200)]
Don't bail on parse errors in macro input for builtin expansion

2 years agoMerge #10289
bors[bot] [Sun, 19 Sep 2021 21:46:51 +0000 (21:46 +0000)]
Merge #10289

10289: fix: Only strip derive attributes when preparing macro input r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10246
cc https://github.com/rust-analyzer/rowan/pull/114, follow up to https://github.com/rust-analyzer/rust-analyzer/pull/10025

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoMerge #10292
bors[bot] [Sun, 19 Sep 2021 21:39:36 +0000 (21:39 +0000)]
Merge #10292

10292: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoOnly strip derive attributes when preparing macro input
Lukas Wirth [Sun, 19 Sep 2021 16:30:29 +0000 (18:30 +0200)]
Only strip derive attributes when preparing macro input

2 years agoSimplify
Lukas Wirth [Sun, 19 Sep 2021 21:34:07 +0000 (23:34 +0200)]
Simplify

2 years agoMerge #10290
bors[bot] [Sun, 19 Sep 2021 17:01:23 +0000 (17:01 +0000)]
Merge #10290

10290: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoSimplify
Lukas Wirth [Sun, 19 Sep 2021 17:00:06 +0000 (19:00 +0200)]
Simplify

2 years agoMerge #10287
bors[bot] [Sun, 19 Sep 2021 13:35:46 +0000 (13:35 +0000)]
Merge #10287

10287: internal: more focused tests for const arguments r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: more focused tests for const arguments
Aleksey Kladov [Sun, 19 Sep 2021 13:35:10 +0000 (16:35 +0300)]
internal: more focused tests for const arguments

2 years agoMerge #10283
bors[bot] [Sun, 19 Sep 2021 11:51:38 +0000 (11:51 +0000)]
Merge #10283

10283: minor: simplify generics parsing r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agominor: simplify
Aleksey Kladov [Sun, 19 Sep 2021 11:32:02 +0000 (14:32 +0300)]
minor: simplify

2 years agointernal: definition based hover functions
hamidreza kalbasi [Sun, 19 Sep 2021 11:45:44 +0000 (16:15 +0430)]
internal: definition based hover functions

2 years agominor: simplify
Aleksey Kladov [Sun, 19 Sep 2021 11:26:35 +0000 (14:26 +0300)]
minor: simplify

2 years agoMerge #10282
bors[bot] [Sun, 19 Sep 2021 09:10:32 +0000 (09:10 +0000)]
Merge #10282

10282: fix: don't allow two turbo-fishes in generic arguments r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agofix: don't allow two turbo-fishes in generic arguments
Aleksey Kladov [Sun, 19 Sep 2021 09:09:50 +0000 (12:09 +0300)]
fix: don't allow two turbo-fishes in generic arguments

2 years agoMerge #10280
bors[bot] [Sun, 19 Sep 2021 08:54:02 +0000 (08:54 +0000)]
Merge #10280

10280: internal: type argument parsing refactoring r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: add erroneous test for double turbo fish
Aleksey Kladov [Sun, 19 Sep 2021 08:42:10 +0000 (11:42 +0300)]
internal: add erroneous test for double turbo fish

We parse `f` successfully, but that is a bug.

2 years agominor: improve readability
Aleksey Kladov [Sun, 19 Sep 2021 08:34:25 +0000 (11:34 +0300)]
minor: improve readability

2 years agominor: reduce duplication
Aleksey Kladov [Sun, 19 Sep 2021 08:19:31 +0000 (11:19 +0300)]
minor: reduce duplication

2 years agoMerge #10276
bors[bot] [Sat, 18 Sep 2021 13:09:51 +0000 (13:09 +0000)]
Merge #10276

10276: internal: parser cleanup r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agofix: correctly handle jointness
Aleksey Kladov [Sat, 18 Sep 2021 13:09:12 +0000 (16:09 +0300)]
fix: correctly handle jointness

2 years agominor: improve readability
Aleksey Kladov [Sat, 18 Sep 2021 12:56:26 +0000 (15:56 +0300)]
minor: improve readability

2 years agointernal: better naming
Aleksey Kladov [Sat, 18 Sep 2021 12:54:55 +0000 (15:54 +0300)]
internal: better naming

2 years agointernal: parser cleanup
Aleksey Kladov [Sat, 18 Sep 2021 12:46:28 +0000 (15:46 +0300)]
internal: parser cleanup

2 years agointernal: minimize use_tree parser tests
Aleksey Kladov [Sat, 18 Sep 2021 12:22:49 +0000 (15:22 +0300)]
internal: minimize use_tree parser tests

The code here is intentionally dense and does exactly what is written.
Explaining semantic difference between Rust 2015 and 2018 doesn't help
with understanding syntax. Better to just add more targeted tests.

2 years agoMerge #10275
bors[bot] [Sat, 18 Sep 2021 12:20:55 +0000 (12:20 +0000)]
Merge #10275

10275: internal: parser cleanups r=Veykril a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 years agointernal: parser cleanups
Aleksey Kladov [Sat, 18 Sep 2021 11:53:46 +0000 (14:53 +0300)]
internal: parser cleanups

2 years agoMerge #10274
bors[bot] [Sat, 18 Sep 2021 11:43:10 +0000 (11:43 +0000)]
Merge #10274

10274: feat: Make inlay hints work in attributed items r=Veykril a=Veykril

Attempt at #10043(previous attempt #10231)
![image](https://user-images.githubusercontent.com/3757771/133887500-091675db-f473-44f8-9bf5-8313ecfbc9e7.png)
Slight difference to the first approach, chaining hints now work but attribute inputs do not as they are basically the same as normal macros in that they take a token tree.

Fixes #10043

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agointernal: more focused trait item parsing tests
Aleksey Kladov [Sat, 18 Sep 2021 11:34:29 +0000 (14:34 +0300)]
internal: more focused trait item parsing tests

2 years agoMake inlay hints work in attributed items
Lukas Wirth [Sat, 18 Sep 2021 11:19:29 +0000 (13:19 +0200)]
Make inlay hints work in attributed items

2 years agoMerge #10273
bors[bot] [Sat, 18 Sep 2021 10:00:47 +0000 (10:00 +0000)]
Merge #10273

10273: minor: Add multi-token mapping test for goto_definition r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 years agoAdd multi-token mapping test for goto_definition
Lukas Wirth [Sat, 18 Sep 2021 09:59:57 +0000 (11:59 +0200)]
Add multi-token mapping test for goto_definition