Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of $crate in macro patterns is questionable #1194

Open
CAD97 opened this issue Aug 13, 2022 · 0 comments
Open

Use of $crate in macro patterns is questionable #1194

CAD97 opened this issue Aug 13, 2022 · 0 comments

Comments

@CAD97
Copy link

CAD97 commented Aug 13, 2022

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.

CAD97 added a commit to CAD97/ndarray that referenced this issue Aug 13, 2022
@CAD97 CAD97 mentioned this issue Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant