Created
May 6, 2022 20:38
-
-
Save luqmana/a5d5ae26e09c733f5c3bbe9811510cfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "foo" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// My `foo` macro! | |
/// | |
/// ```compile_fail | |
/// # #[macro_use] extern crate foo; | |
/// # fn main() { | |
/// foo!(); | |
/// # } | |
/// ``` | |
#[macro_export] | |
macro_rules! foo { | |
() => { | |
// invalid syntax | |
if {} | |
} | |
} |
Author
luqmana
commented
May 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment