Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[allow(dead_code)]
- struct Thing {
- x: usize,
- y: &'static str,
- more: Vec<String>
- }
- macro_rules! th {
- ($x:expr, $y:expr) => (Thing{x: $x, y: $y, more: vec![]})
- }
- fn main() {
- let x = 2usize;
- let y = "bar";
- let _thing = th!(x, y);
- }
Add Comment
Please, Sign In to add comment