Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse rust path in short doc links #9686

Merged
merged 1 commit into from Nov 15, 2022
Merged

Parse rust path in short doc links #9686

merged 1 commit into from Nov 15, 2022

Conversation

dima74
Copy link
Member

@dima74 dima74 commented Nov 6, 2022

Continuation of #7353

Now paths in short links are parsed as RsPath, and thus resolve and completion works for them. Note that short links can be either a path or a label, depending on the existence of the corresponding link definition for the label

/// [bar1] - direct link
/// [bar2] - markdown label reference
///
/// [bar2]: bar3
fn foo() {}

This together with #9688 will fix #6905

changelog: Support short intra-doc links (in format [link])

@dima74 dima74 added the feature label Nov 6, 2022
@intellij-rust-bot intellij-rust-bot added this to In Progress in To test Nov 6, 2022
Copy link
Member

@vlad20012 vlad20012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Btw does rustdoc disallows spaces between brackets and backticks like this:

[  `foo`  ]

?

@dima74
Copy link
Member Author

dima74 commented Nov 14, 2022

Btw does rustdoc disallows spaces between brackets and backticks like this:

[  `foo`  ]

?

Spaces are allowed, fixed

@vlad20012
Copy link
Member

Spaces are allowed

And what about tabs, are they allowed? :D

@dima74
Copy link
Member Author

dima74 commented Nov 14, 2022

And what about tabs, are they allowed? :D

Looks like yes, fixed

Copy link
Member

@vlad20012 vlad20012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

bors bot added a commit that referenced this pull request Nov 15, 2022
9686: Parse rust path in short doc links r=vlad20012 a=dima74

Continuation of #7353

Now paths in short links are parsed as `RsPath`, and thus resolve and completion works for them. Note that short links can be either a path or a label, depending on the existence of the corresponding link definition for the label

```rust
/// [bar1] - direct link
/// [bar2] - markdown label reference
///
/// [bar2]: bar3
fn foo() {}
```

This together with #9688 will fix #6905

changelog: Support short [intra-doc links](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html) (in format `[link]`)


9729: Enable `function-like` and `derive` proc macro expansion by default r=vlad20012 a=vlad20012

If you came to this PR because your issue just has been closed, note the plugin including PR will be released only in early December. If you can't wait to try it now, you can use the nightly IntelliJ Rust plugin channel (see [instructions](https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-quick-start.html#install-nightly)).

Derive macros support:
Fixes #4629
Fixes #5468
Fixes #5478
Fixes #5728
Fixes #5954
Fixes #6036
Fixes #6489
Fixes #6880
Fixes #7158
Fixes #7848
Fixes #8193
Fixes #8415
Fixes #8581
Fixes #8610
Fixes #8847
Fixes #8856
Fixes #9133
Fixes #9216
Fixes #9226
Fixes #9682
Fixes #7707
Fixes #7365
Fixes #6482

Function-like macros support:
Fixes #4707
Fixes #6367
Fixes #6983
Fixes #7090
Fixes #7242
Fixes #7608
Fixes #7699
Fixes #8049
Fixes #8785
Fixes #9266

changelog: Enable [`function-like`](https://doc.rust-lang.org/reference/procedural-macros.html#function-like-procedural-macros)  and [`derive`](https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros) proc macro expansion by default.
Note that attribute procedural macro expansion is still disabled by default. If you want to try it, you can enable `org.rust.macros.proc.attr` [experimental feature](https://plugins.jetbrains.com/plugin/8182-rust/docs/#experimental-features).


Co-authored-by: Dmitry Murzin <diralik@yandex.ru>
Co-authored-by: vlad20012 <beskvlad@gmail.com>
@bors
Copy link
Contributor

bors bot commented Nov 15, 2022

Build failed (retrying...):

bors bot added a commit that referenced this pull request Nov 15, 2022
9686: Parse rust path in short doc links r=vlad20012 a=dima74

Continuation of #7353

Now paths in short links are parsed as `RsPath`, and thus resolve and completion works for them. Note that short links can be either a path or a label, depending on the existence of the corresponding link definition for the label

```rust
/// [bar1] - direct link
/// [bar2] - markdown label reference
///
/// [bar2]: bar3
fn foo() {}
```

This together with #9688 will fix #6905

changelog: Support short [intra-doc links](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html) (in format `[link]`)


9741: INT: Don't offer `Un-elide lifetimes` intention when no input lifetimes r=mchernyavsky a=dima74

Fixes #9734

changelog: Don't offer `Un-elide lifetimes` intention when there is no input lifetimes

Co-authored-by: Dmitry Murzin <diralik@yandex.ru>
@bors
Copy link
Contributor

bors bot commented Nov 15, 2022

Build failed (retrying...):

@vlad20012
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 15, 2022

Already running a review

@bors
Copy link
Contributor

bors bot commented Nov 15, 2022

Build succeeded:

@bors bors bot merged commit 6926b9e into master Nov 15, 2022
To test automation moved this from In Progress to Test Nov 15, 2022
@bors bors bot deleted the diralik/short-doc-links branch November 15, 2022 19:16
@github-actions github-actions bot added this to the v184 milestone Nov 15, 2022
@dima74 dima74 mentioned this pull request Nov 16, 2022
11 tasks
@mili-l mili-l self-assigned this Nov 24, 2022
@mili-l mili-l moved this from Test to Done in To test Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

Refactor doc comment links when refactoring code
3 participants