mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 14:22:34 +00:00
67 lines
2.3 KiB
Text
67 lines
2.3 KiB
Text
error[E0277]: the trait bound `bool: ArgEnum` is not satisfied
|
|
--> tests/derive_ui/bool_arg_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^ the trait `ArgEnum` is not implemented for `bool`
|
|
|
|
|
note: required by `clap::ArgEnum::from_str`
|
|
--> src/derive.rs
|
|
|
|
|
| fn from_str(input: &str, ignore_case: bool) -> Result<Self, String> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0618]: expected function, found enum variant `bool`
|
|
--> tests/derive_ui/bool_arg_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^ call expression requires function
|
|
|
|
|
help: `bool` is a unit variant, you need to write it without the parenthesis
|
|
|
|
|
7 | opts: bool,
|
|
| ~~~~
|
|
|
|
warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
|
|
--> tests/derive_ui/bool_arg_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^
|
|
|
|
|
= note: `#[warn(deprecated)]` on by default
|
|
|
|
error[E0277]: the trait bound `bool: ArgEnum` is not satisfied
|
|
--> tests/derive_ui/bool_arg_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^ the trait `ArgEnum` is not implemented for `bool`
|
|
|
|
|
note: required by `value_variants`
|
|
--> src/derive.rs
|
|
|
|
|
| fn value_variants<'a>() -> &'a [Self];
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0277]: the trait bound `bool: ArgEnum` is not satisfied
|
|
--> tests/derive_ui/bool_arg_enum.rs:6:5
|
|
|
|
|
6 | / #[clap(short, arg_enum)]
|
|
7 | | opts: bool,
|
|
| |______________^ the trait `ArgEnum` is not implemented for `bool`
|
|
|
|
|
note: required by a bound in `ArgEnum`
|
|
--> src/derive.rs
|
|
|
|
|
| / pub trait ArgEnum: Sized + Clone {
|
|
| | /// All possible argument values, in display order.
|
|
| | fn value_variants<'a>() -> &'a [Self];
|
|
| |
|
|
... |
|
|
| | fn to_possible_value<'a>(&self) -> Option<PossibleValue<'a>>;
|
|
| | }
|
|
| |_^ required by this bound in `ArgEnum`
|
|
|
|
warning: use of deprecated associated function `clap::Arg::<'help>::possible_values`: Replaced with `Arg::value_parser(PossibleValuesParser::new(...)).takes_value(true)`
|
|
--> tests/derive_ui/bool_arg_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^
|