mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
773ba94c4e
This will make it easier to divide off parser logic for adding in actions. This does mean we can't provide error reporting on bad values with `bool` but - We should have also been doing that for `from_flag` - We'll be dropping this soon in clap4 anyways
22 lines
746 B
Text
22 lines
746 B
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,
|
|
| ~~~~
|