Skip to content

Instantly share code, notes, and snippets.

@ianfabs
Created November 15, 2019 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianfabs/8cc5eebffbad2dc8476daecbbb6cb859 to your computer and use it in GitHub Desktop.
Save ianfabs/8cc5eebffbad2dc8476daecbbb6cb859 to your computer and use it in GitHub Desktop.
A rust macro definition for creating tuples. Kinda useless, kinda cool.
#[macro_export]
#[doc = " generate tuple"]
macro_rules! tuple {
($($n: expr),*) => {($($n,)*)};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment