tailhook / rust-argparse

The command-line argument parser library for rust
MIT License
240 stars 39 forks source link

Fails to compile. #4

Closed JP-Ellis closed 10 years ago

JP-Ellis commented 10 years ago

This currently fails to compile properly. I tried fixing it, but I am not yet familiar enough with Rust and the (too simple?) fix caused more errors.

The error message is:

argparse/action.rs:13:14: 13:25 error: explicit lifetime bound required
argparse/action.rs:13     Flag(Box<IFlagAction>),
                                   ^~~~~~~~~~~
argparse/action.rs:14:16: 14:26 error: explicit lifetime bound required
argparse/action.rs:14     Single(Box<IArgAction>),
                                     ^~~~~~~~~~
argparse/action.rs:15:14: 15:25 error: explicit lifetime bound required
argparse/action.rs:15     Push(Box<IArgsAction>),
                                   ^~~~~~~~~~~
argparse/action.rs:16:14: 16:25 error: explicit lifetime bound required
argparse/action.rs:16     Many(Box<IArgsAction>),
                                   ^~~~~~~~~~~
argparse/parser.rs:75:17: 75:27 error: explicit lifetime bound required
argparse/parser.rs:75     action: Box<IArgAction>,
                                      ^~~~~~~~~~
argparse/parser.rs:133:23: 133:29 error: explicit lifetime bound required
argparse/parser.rs:133     stderr: &'ctx mut Writer,
                                             ^~~~~~
argparse/parser.rs:596:21: 596:35 error: wrong number of lifetime parameters: expected 1, found 0 [E0107]
argparse/parser.rs:596     pub fn new() -> ArgumentParser {
                                           ^~~~~~~~~~~~~~
argparse/parser.rs:713:18: 713:24 error: explicit lifetime bound required
argparse/parser.rs:713     buf: &'a mut Writer,
                                        ^~~~~~
tailhook commented 10 years ago

What version of rust do you use? rust-argparse master branch compiles by rust 0.11.0.

JP-Ellis commented 10 years ago

Using the nightly version. Specifically: rustc 0.12.0-pre-nightly (d59d97cbe 2014-09-04 01:11:04 +0000). I am trying this with the rust0.12 branch too.

tailhook commented 10 years ago

There is "rust0.12" branch in the rust-argparse. But I believe it's outdated either. I'll take a look when have some time.

tailhook commented 10 years ago

Fix for current rust nightly (rust0.12 branch). And now it's also tracked by travis.