Skip to content

Document $crate in macro matcher #588

Description

@ehuss

$crate in a macro matcher is the reserved identifier $crate that doesn't have a way to write it outside of a macro (I think?). That is:

macro_rules! m {(x) => {
m!($crate:tt)};($crate:tt) => ()}fnmain(){m!(x);// OKm!(y);// ERRORm!($crate:tt);// ERRORm!(crate:tt);// ERROR}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions