mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-28 14:59:18 +00:00
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!
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! my_macro {
|
||||
($x:expr) => {{
|
||||
format!("Hello {}", $x)
|
||||
}};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if my_macro!("world!") != "Hello world!" {
|
||||
panic!("Oh no! Wrong output!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user