summaryrefslogblamecommitdiff
path: root/meap/meap-code/ch3/ch3-string-macro.rs
blob: bc68c588638c11c2125f5a45c992808f20c43519 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                             
macro_rules! string {
    ($x:expr) => (
        String::from($x);
    )
}

fn main() {
    let s = string!("hello");
    println!("{}", s);
}