Introduce #[structopt(external_subcommand)]#314
Merged
Conversation
CreepySkeleton
commented
Dec 22, 2019
This was referenced Dec 25, 2019
Merged
Collaborator
Author
|
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
CreepySkeleton
commented
Jan 11, 2020
Comment on lines
+1
to
+8
| 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>` |
Collaborator
Author
There was a problem hiding this comment.
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 😢
Collaborator
Author
There was a problem hiding this comment.
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.
Collaborator
Author
|
OK, ready to go |
Collaborator
Author
|
ping @TeXitoi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #130
I took some time to develop and debug, but it's finally ready. I have one concern thought.