Skip to content

Rustdoc issues with macro reexport #56173

Closed
@weiznich

Description

@weiznich

I've toying around a bit with how and where to document things. For this I've tried to reexport things at certain locations. To let the documentation appear on the reexported location I've been using #[doc(inline)]. This works fine for normal items, but fails for macros generated by macro rules and for custom derives. They are continued to be rendered just as reexports.

Reproducing example:

/// item
pub struct SomeItem {
    i: i32
}

/// some macro
#[macro_export]
macro_rules! foo {
    ($i: ident) => {}
}

/// foo
pub mod bar {
    #[doc(inline)]
    pub use super::SomeItem;

    #[doc(inline)]
    pub use foo;
}

Resulting docs for bar:
docs

I would expect that the documentation appears inline similar like the documentation of SomeItem.

Rustdoc version:

rustdoc --version       
rustdoc 1.32.0-nightly (0b9f19dff 2018-11-21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions