docopt.rs icon indicating copy to clipboard operation
docopt.rs copied to clipboard

docopt_macros does not build under rustc 1.18.0 nightly

Open cormac-obrien opened this issue 8 years ago • 3 comments

Building version 0.7.0 under rustc 1.18.0-nightly (53f4bc311 2017-04-07):

error[E0308]: mismatched types
   --> .../docopt_macros-0.7.0/src/macro.rs:316:16
    |
316 |         types: P::from_vec(vec![cx.ty_ident(sp, ident("String"))]),
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found struct `syntax::ptr::P`
    |
    = note: expected type `std::vec::Vec<syntax::ptr::P<syntax::ast::Ty>>`
               found type `syntax::ptr::P<[syntax::ptr::P<syntax::ast::Ty>]>`
    = help: here are some functions which might fulfill your needs:
            - .into_vec()
            - .to_vec()

error[E0308]: mismatched types
   --> .../docopt_macros-0.7.0/src/macro.rs:317:19
    |
317 |         bindings: P::new(),
    |                   ^^^^^^^^ expected struct `std::vec::Vec`, found struct `syntax::ptr::P`
    |
    = note: expected type `std::vec::Vec<syntax::ast::TypeBinding>`
               found type `syntax::ptr::P<[_]>`
    = help: here are some functions which might fulfill your needs:
            - .into_vec()
            - .to_vec()

error[E0063]: missing field `span` in initializer of `syntax::ast::PathSegment`
   --> .../docopt_macros-0.7.0/src/macro.rs:321:24
    |
321 |         segments: vec![ast::PathSegment {
    |                        ^^^^^^^^^^^^^^^^ missing `span`

error: aborting due to 3 previous errors

cormac-obrien avatar Apr 09 '17 05:04 cormac-obrien

Note that this is docopt_macros, not docopt.

If you're seeking stability, I'd recommend not using docopt_macros.

BurntSushi avatar Apr 09 '17 12:04 BurntSushi

Same here

izderadicka avatar May 10 '17 16:05 izderadicka

I have the same problem and I was about to raise a PR, but I think #209 already fixes this?

snim2 avatar May 26 '17 11:05 snim2