You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
The text was updated successfully, but these errors were encountered:
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".
Too bad, this makes concat_idents!() way less useful than I thought...
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;
The text was updated successfully, but these errors were encountered: