Skip to content

Use of $crate in macro patterns is questionable #1194

Description

@CAD97

See rust-lang/rust#99447 (comment)

The fact that $crate in the macro_rules LHS is accepted and glued into kw::DollarCrate is likely an accidental bug. The single use is an internal macro helper arm,

(@parse ::core::marker::PhantomData::<$crate::Ix0>, ::core::marker::PhantomData::<$crate::Ix0>, []) => {

which looking at the macro, should probably be written to take $in_dim:expr, $out_dim:expr, like the other arms anyway.

Activity

  1. added a commit that references this issue on Aug 13, 2022
    05b781a
  2. akern40 commented on May 21, 2025

    @akern40
    Collaborator

    Given that there is no associated bug report here nor safety / soundness issues, I'm going to close for now. Feel free to re-open if necessary.

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

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