-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce #[structopt(external_subcommand)]
#314
Conversation
Sorry for the radio silence, the New Year and all :) This is not abandoned, I'll get to it in 1-2 days. |
787473f
to
eec7171
Compare
error[E0308]: mismatched types | ||
--> $DIR/external_subcommand_wrong_type.rs:13:15 | ||
| | ||
13 | Other(Vec<CString>) | ||
| ^^^^^^^ expected struct `std::ffi::CString`, found struct `std::ffi::OsString` | ||
| | ||
= note: expected type `std::vec::Vec<std::ffi::CString>` | ||
found type `std::vec::Vec<std::ffi::OsString>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message is rather unfortunate: I would very much like it to say "expected OsString", but there's nothing we can do about it 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the best I've managed to come up with:
error[E0308]: mismatched types
--> $DIR/external_subcommand_wrong_type.rs:13:15
|
13 | Other(Vec<CString>)
| ^^^^^^^ expected struct `std::ffi::CString`, found struct `std::ffi::OsString`
|
= note: expected type `std::vec::Vec<std::ffi::CString>`
found type `std::vec::Vec<std::ffi::OsString>`
error[E0308]: mismatched types
--> $DIR/external_subcommand_wrong_type.rs:13:15
|
13 | Other(Vec<CString>)
| ^^^^^^^
| |
| expected struct `std::ffi::OsString`, found struct `std::ffi::CString`
| this match expression has type `std::vec::Vec<std::ffi::OsString>`
|
= note: expected type `std::vec::Vec<std::ffi::OsString>`
found type `std::vec::Vec<std::ffi::CString>`
While it is indeed possible to draw the error message we desire, I can't get rid of the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's acceptable
OK, ready to go |
ping @TeXitoi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Closes #130
I took some time to develop and debug, but it's finally ready. I have one concern thought.