- todo
todo! for and if-condition
- todo! when we put in the layout of the code but cannot work on all the codepathes at the same time and we would like to say it explicitely.
examples/macros/todo/src/main.rs
fn main() { let args: Vec<String> = std::env::args().collect(); if args.len() != 2 { println!("Usage: {} name", &args[0]); std::process::exit(1); } let val = &args[1]; if val == "foo" { println!("ok"); } else { todo!(); //unimplemented!(); } }
cargo run foo cargo run bar