This repository was archived by the owner on Sep 14, 2023. It is now read-only.
Description When I try to use docopt_macros v0.8.1, I found compile error like that,
-> % cargo run
Updating registry ` https://github.com/rust-lang/crates.io-index`
Compiling docopt_macros v0.8.1
error[E0308]: mismatched types
--> /Users/Khigashiguchi/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.8.1/src/macro.rs:187:20
|
187 | .map(| (ident, ty)| {
| ^^^^^^^^^^^ expected struct ` std::vec::Vec` , found tuple
|
= note: expected type ` std::vec::Vec<( syntax::ast::Ident, syntax::ptr::P< syntax::ast::Ty> ) > `
found type ` (_, _)`
error: aborting due to previous error
error: Could not compile ` docopt_macros` .
My code is above...
#![ feture( plugin) ]
#![ plugin( docopt_macros) ]
#[ macro_use]
extern crate serde_derive;
extern crate docopt;
use docopt:: Docopt ;
docopt ! ( Args derive Debug , "
Usage:
cref
cref import <import-repo>...
cref list
cref update [<update-repo>...]
cref delete <delete-repo>
cref (--help | --version)
Options:
-h, --help Show this screen
-v, --version Show version
" ) ;
fn main ( ) {
let args: Args = Args :: docopt ( ) . deserialize ( ) . unwrap_or_else ( |e| e. exit ( ) ) ;
println ! ( "{:?}" , args) ;
}
[package]
name = "cli_search_proper_english_message"
version = "0.1.0"
authors = ["Khigashiguchi"]
[dependencies]
docopt = "0.8"
docopt_macros = "*"
serde = "1.0"
serde_derive = "1.0"
cargo --version
cargo 0.24.0-nightly (5bb478a51 2017-11-29)
rustc --version
rustc 1.24.0-nightly (1956d5535 2017-12-03)
Please teach me how to solve it.
Reactions are currently unavailable