-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
cannot define a capturing macro in an expr passed to println! #31946
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
Comments
durka
added a commit
to durka/cargo-script
that referenced
this issue
Feb 28, 2016
This has been fixed, likely by @jseyfried. I think it needs a test though. |
durka
added a commit
to durka/rust
that referenced
this issue
Mar 14, 2017
Adds a test for issue rust-lang#31946 which was fixed a while ago.
jseyfried
added
the
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
label
Mar 15, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 18, 2017
add test for nested macro def (rust-lang#31946) Adds a test for issue rust-lang#31946 which was fixed in 1.12.0. Closes rust-lang#31946.
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 19, 2017
add test for nested macro def (rust-lang#31946) Adds a test for issue rust-lang#31946 which was fixed in 1.12.0. Closes rust-lang#31946.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 20, 2017
add test for nested macro def (rust-lang#31946) Adds a test for issue rust-lang#31946 which was fixed in 1.12.0. Closes rust-lang#31946.
retep998
pushed a commit
to durka/rust
that referenced
this issue
Mar 21, 2017
Adds a test for issue rust-lang#31946 which was fixed a while ago.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 22, 2017
add test for nested macro def (rust-lang#31946) Adds a test for issue rust-lang#31946 which was fixed in 1.12.0. Closes rust-lang#31946.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 22, 2017
add test for nested macro def (rust-lang#31946) Adds a test for issue rust-lang#31946 which was fixed in 1.12.0. Closes rust-lang#31946.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code
fails with a nonsense "unknown macro variable
name
". It works if the macro has no captures or if it's defined outside. And you can normally define a macro in an expression.Somehow related to the
format_args!
expansion, but it doesn't occur without the intermediatepassthru!
macro (which representsprintln!
,print!
, orformat!
). And I can't see the expansion because it doesn't get that far.The text was updated successfully, but these errors were encountered: