]> git.proxmox.com Git - rustc.git/blame - vendor/structopt/tests/ui/flatten_and_methods.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / vendor / structopt / tests / ui / flatten_and_methods.rs
CommitLineData
f20569fa
XL
1// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu>
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9use structopt::StructOpt;
10
11#[derive(StructOpt, Debug)]
12struct DaemonOpts {
13 #[structopt(short)]
14 user: String,
15 #[structopt(short)]
16 group: String,
17}
18
19#[derive(StructOpt, Debug)]
20#[structopt(name = "basic")]
21struct Opt {
22 #[structopt(short, flatten)]
23 opts: DaemonOpts,
24}
25
26fn main() {
27 let opt = Opt::from_args();
28 println!("{:?}", opt);
29}