Skip to content

Cannot macro_use a macro that uses an internal macro #25003

Open
@seanmonstar

Description

For instance, trying to use the log crate:

#[macro_use(debug)] extern crate log;

fn main() {
    debug!("hello");
}

Errors with:

<log macros>:4:1: 4:4 error: macro undefined: 'log!'
<log macros>:4 log ! ( $ crate:: LogLevel:: Debug , $ ( $ arg ) * ) ; )

If you import the log macro also, all is well. In this case, that's possible. However, a crate that has an internal macro for sanity, and not to be exported, is stuck.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions