mirror of
https://github.com/clap-rs/clap
synced 2025-01-08 02:38:47 +00:00
9e38353442
We aren't enumerating arguments but values for an argument, so the name should reflect that. This will be important as part of #1807 when we have more specific attribute names.
73 lines
2.5 KiB
Text
73 lines
2.5 KiB
Text
warning: use of deprecated variant `clap::ArgAction::IncOccurrence`: Replaced with `ArgAction::SetTrue` or `ArgAction::Count`
|
|
--> tests/derive_ui/stable/bool_value_enum.rs:6:5
|
|
|
|
|
6 | #[clap(short, value_enum)]
|
|
| ^
|
|
|
|
|
= note: `#[warn(deprecated)]` on by default
|
|
|
|
warning: use of deprecated variant `clap::ArgAction::IncOccurrence`: Replaced with `ArgAction::SetTrue` or `ArgAction::Count`
|
|
--> tests/derive_ui/stable/bool_value_enum.rs:6:5
|
|
|
|
|
6 | #[clap(short, value_enum)]
|
|
| ^
|
|
|
|
error[E0277]: the trait bound `bool: ValueEnum` is not satisfied
|
|
--> tests/derive_ui/stable/bool_value_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^ the trait `ValueEnum` is not implemented for `bool`
|
|
|
|
|
note: required by `clap::ValueEnum::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/stable/bool_value_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/stable/bool_value_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^
|
|
|
|
error[E0277]: the trait bound `bool: ValueEnum` is not satisfied
|
|
--> tests/derive_ui/stable/bool_value_enum.rs:7:11
|
|
|
|
|
7 | opts: bool,
|
|
| ^^^^ the trait `ValueEnum` 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: ValueEnum` is not satisfied
|
|
--> tests/derive_ui/stable/bool_value_enum.rs:6:5
|
|
|
|
|
6 | / #[clap(short, value_enum)]
|
|
7 | | opts: bool,
|
|
| |______________^ the trait `ValueEnum` is not implemented for `bool`
|
|
|
|
|
note: required by a bound in `ValueEnum`
|
|
--> src/derive.rs
|
|
|
|
|
| / pub trait ValueEnum: 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 `ValueEnum`
|