We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would expect the following program to print right. Instead it prints wrong.
right
wrong
#![feature(macro_literal_matcher)] macro_rules! a { ($i:literal) => { "right" }; ($i:tt) => { "wrong" }; } macro_rules! b { ($i:literal) => { a!($i) }; } fn main() { println!(b!(0)); }
Originally reported by @jendrikw in #35625 (comment).
The text was updated successfully, but these errors were encountered:
literal
Is any work being done on this? I found something that could help.
syntax::ext::tt::macro_parser: may_begin_with("literal", Interpolated((NtLiteral(..), None))) = false
Sorry, something went wrong.
@0e4ef622 you're welcome to submit a PR 😊. Just remember to add a test case in src/test/run-pass.
src/test/run-pass
Rollup merge of rust-lang#53093 - 0e4ef622:issue-52169-fix, r=petroch…
c122061
…enkov Enable macros to pass $:literal to another macro Fixes rust-lang#52169.
No branches or pull requests
I would expect the following program to print
right
. Instead it printswrong
.Originally reported by @jendrikw in #35625 (comment).
The text was updated successfully, but these errors were encountered: