fork(1) download
  1. use std::io::stdin;
  2. use std::io::BufRead;
  3. use std::io::BufReader;
  4.  
  5. macro_rules! log {
  6. ($foo:expr)=>{
  7. fn $foo(){println!("123");}
  8. };
  9. }
  10.  
  11. fn main() {
  12. log!(foo);
  13. foo();
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
error: expected identifier, found `foo`
 --> prog.rs:7:16
  |
7 |             fn $foo(){println!("123");}
  |                ^^^^

error: aborting due to previous error

stdout
Standard output is empty