clap/clap_derive/tests/ui/clap_empty_attr.rs

17 lines
214 B
Rust
Raw Normal View History

use clap::Parser;
2020-01-20 21:19:37 +00:00
#[derive(Parser, Debug)]
2020-01-20 21:19:37 +00:00
#[clap]
struct Opt {}
#[derive(Parser, Debug)]
2020-01-20 21:19:37 +00:00
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);
}