]>
git.proxmox.com Git - rustc.git/blob - vendor/clap/src/builder/tests.rs
5 fn propagate_version() {
6 let mut cmd
= Command
::new("test")
7 .propagate_version(true)
9 .subcommand(Command
::new("sub1"));
12 cmd
.get_subcommands().next().unwrap().get_version(),
19 let mut cmd
= Command
::new("test")
20 .disable_version_flag(true)
21 .subcommand(Command
::new("subcmd"));
25 .find(|s
| s
.get_name() == "subcmd")
27 .is_disable_version_flag_set());
30 // This test will *fail to compile* if Command is not Send + Sync
33 fn foo
<T
: Send
+ Sync
>(_
: T
) {}
34 foo(Command
::new("test"))
39 let mut cmd
= Command
::new("cmd")
40 .disable_version_flag(true)
41 .subcommand(Command
::new("sub"));
42 cmd
._build_self(false);
48 .is_disable_version_flag_set());
51 // This test will *fail to compile* if Arg is not Send + Sync
54 fn foo
<T
: Send
+ Sync
>(_
: T
) {}