-
Notifications
You must be signed in to change notification settings - Fork 13.4k
cannot define a capturing macro in an expr passed to println! #31946
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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.
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.
# for free
to join this conversation on GitHub.
Already have an account?
# 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: