clap/clap_derive/tests/ui/clap_empty_attr.rs

17 lines
208 B
Rust
Raw Normal View History

2020-01-20 21:19:37 +00:00
use clap::Clap;
#[derive(Clap, Debug)]
#[clap]
struct Opt {}
#[derive(Clap, Debug)]
struct Opt1 {
#[clap = "short"]
foo: u32,
2020-01-20 21:19:37 +00:00
}
fn main() {
let opt = Opt::parse();
2020-01-20 21:19:37 +00:00
println!("{:?}", opt);
}