From 9521266b58534e97d26148bb6a5de8e03da56eb6 Mon Sep 17 00:00:00 2001 From: Paul Czeresko <p.czeresko.3@gmail.com> Date: Mon, 22 Jul 2019 21:01:15 -0400 Subject: [PATCH] Complete test4 --- exercises/test4.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/exercises/test4.rs b/exercises/test4.rs index e50f1b0..8659805 100644 --- a/exercises/test4.rs +++ b/exercises/test4.rs @@ -5,6 +5,13 @@ // Write a macro that passes the test! No hints this time, you can do it! +#[macro_export] +macro_rules! my_macro { + ($x:expr) => {{ + format!("Hello {}", $x) + }}; +} + fn main() { if my_macro!("world!") != "Hello world!" { panic!("Oh no! Wrong output!");