Skip to content

Intra-doc links don't accept all macro delimiters #86310

Closed
@LeSeulArtichaut

Description

@LeSeulArtichaut

Consider this code:

// This can be invoked with `foo!()`, `foo[]` or `foo{}`
#[macro_export] macro_rules! foo {
    () => {}
}

/// This is parsed as an intra-doc link: [foo!()]...
/// ...but those aren't: [foo![]] [foo!{}]
pub struct Foo;

I'm not sure if this is a deliberate decision or not. If it is, what's the rationale for not accepting [] and {}? cc @jyn514

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions