Skip to content

Rustdoc displays macros as macro_rules!s #76761

Closed
@camelid

Description

@camelid

See for std::marker::Copy:

image

But when you click on [src]:

pub macro Copy($item:item) {
    /* compiler built-in */
}

Or for proc_macro::quote!:

image

With source:

pub macro quote($($t:tt)*) {
    /* compiler built-in */
}

Or for core::ready!, which is not a built-in:

image

pub macro ready($e:expr) {
    match $e {
        $crate::task::Poll::Ready(t) => t,
        $crate::task::Poll::Pending => {
            return $crate::task::Poll::Pending;
        }
    }
}

@rustbot modify labels: T-rustdoc C-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.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