Complete test4
This commit is contained in:
parent
d6a79f2399
commit
9521266b58
|
@ -5,6 +5,13 @@
|
||||||
|
|
||||||
// Write a macro that passes the test! No hints this time, you can do it!
|
// 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() {
|
fn main() {
|
||||||
if my_macro!("world!") != "Hello world!" {
|
if my_macro!("world!") != "Hello world!" {
|
||||||
panic!("Oh no! Wrong output!");
|
panic!("Oh no! Wrong output!");
|
||||||
|
|
Loading…
Reference in a new issue