You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use clap::Clap;fnmain(){let _opts = Opts::parse();}#[derive(Clap)]structOpts{#[clap(subcommand)]subcmd:SubCommand,}#[derive(Clap)]enumSubCommand{Test,}
Steps to reproduce the bug with the above code
cargo build
Actual Behaviour
error[E0308]: mismatched types
--> src/main.rs:10:13
|
10 | subcmd: SubCommand,
| ^^^^^^^^^^ expected enum `Option`, found `&mut SubCommand`
|
= note: expected enum `Option<(&str, &ArgMatches)>`
found mutable reference `&mut SubCommand`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
Expected Behaviour
The program compiles.
Additional Context
This issue is initially discovered in #2375. Filing as a separate issue because that's different from the original issue described there.
Debug Output
No response
The text was updated successfully, but these errors were encountered:
Please complete the following tasks
Rust Version
rustc 1.50.0 (cb75ad5db 2021-02-10)
Clap Version
master
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo build
Actual Behaviour
Expected Behaviour
The program compiles.
Additional Context
This issue is initially discovered in #2375. Filing as a separate issue because that's different from the original issue described there.
Debug Output
No response
The text was updated successfully, but these errors were encountered: