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

Resolve simple declarative macros in #[doc = ...] #15326

Closed
not-my-profile opened this issue Jul 22, 2023 · 1 comment
Closed

Resolve simple declarative macros in #[doc = ...] #15326

not-my-profile opened this issue Jul 22, 2023 · 1 comment
Labels
C-feature Category: feature request

Comments

@not-my-profile
Copy link

A common use case would be #[doc = include_str!("../../README.md")]. Such include calls currently do not appear to be resolved by rust-analyzer (hovering over the identifier doesn't show the documentation from the README).

It would be great if rust-analyzer could additionally resolve simple custom declarative macros in #[doc = ...], e.g:

macro_rules! link {
    ($label:literal, $path:literal) => {
        concat!("[", $label, "](https://example.com/some/path", $path, ")")
    };
}

#[doc = link!("foo", "/bar.html")]
struct Foo;
@not-my-profile not-my-profile added the C-feature Category: feature request label Jul 22, 2023
@Veykril
Copy link
Member

Veykril commented Jul 30, 2023

Duplicate of #8092

@Veykril Veykril marked this as a duplicate of #8092 Jul 30, 2023
@Veykril Veykril closed this as completed Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants