Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMacros don't get expanded when used in item name token position #4365
Comments
This comment has been minimized.
This comment has been minimized.
|
Hmm, ok, I see. I failed to grok the following sentence during my first ten readings of the Macro Tutorial: "A macro invocation may take the place of (and therefore expand to) either an expression, an item, or a statement". |
This comment has been minimized.
This comment has been minimized.
|
I don't think we're planning to extend the macro system in this way, but feel free to make another issue requesting it as an RFC :-) |
catamorphism
closed this
Jan 10, 2013
lifthrasiir
referenced this issue
Feb 14, 2014
Closed
Can't define a function name using concat_idents!() #12249
overvenus
added a commit
to tikv/tikv
that referenced
this issue
Aug 11, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vadimcn commentedJan 7, 2013
All of the examples below fail to compile with an error similar to the following:
test.rs:1:16: 1:17 error: expected
(but found!test.rs:1 fn concat_idents!(foo, bar) () {}
^
fn concat_idents!(foo, bar) () {}
trait concat_idents!(foo, bar) {}
mod concat_idents!(foo, bar) {}
let concat_idents!(foo, bar) = 0;