Skip to content

Macros are not propagated through pub extern crate. #51530

Closed
@Xaeroxe

Description

@Xaeroxe

As of Rust 1.26.2 stable if I define an exported macro in crate foo then pub extern crate foo in another crate bar then consumers of the bar crate cannot use the macro in foo even if there is a #[macro_use] on the pub extern crate foo and a #[macro_use] on the extern crate bar in the consumers code.

I would expect the macros to be propagated similarly to the other items in the foo crate.

This can be worked around by having the consumer of bar depend on foo directly, but that defeats the purpose of the pub extern crate imo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions