Skip to content

rustdoc: move #[macro_use] extern crate statements outside the generated main in doctests #49174

Closed
@QuietMisdreavus

Description

@QuietMisdreavus

In #48106 i moved plain extern crate some_crate statements outside the fn main that rustdoc generates, but i failed to take #[macro_use] attributes into account. Since one of the common reasons people would add the manual crate import is to import its macros, this makes the feature less useful.

(Mentoring instructions to follow...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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