-
Notifications
You must be signed in to change notification settings - Fork 106
example seems broken #70
Comments
ran into this too, so at least you are not alone |
Ok, I figured it out that the syntax has changed to: foreign_links {
::std::io::Error, Io;
} The quickstart's just outdated |
Hum, in fact the quickstart is not outdated, it just compiles on master and not 0.6. |
This is a Problem with looking up docs on GitHub. I strongly recommend using docs.rs https://docs.rs/error-chain :-) |
@colin-kiegel See above comment Also the code is from an example file... (The link redirects to the |
I do, it's just that rust-lang/rust#15470 |
I could always copy it manually, but the advantage of |
The most recent readme from docs.rs does not link any example.rs on the master branch https://docs.rs/crate/error-chain/0.6.1/source/README.md What's your Cargo.toml? If you use the standard package from crates.io you should not consider any documentation on github, but rather docs.rs. Or are you downloading this crate from github? |
Yeah, the link towards I build the doc for |
I literally have no idea what's going on here but:
I'd suggest someone to fix the example to match the syntax in the docs. That's what I'd do. |
In fact, e5c06b7 was added after 0.6.1, so 0.6.1 uses the old the syntax. The trouble is that when you go to https://github.com/brson/error-chain, you see the README for master, with the new syntax. |
From the github README, I click on quickstart, look at the example.
I then copied the example with macro , except I added an
errors.rs
module, turn off default features, add the recursion limit, macro_use, bla bla, and put this insideerrors.rs
:this won't compile with:
Which is impossible for me to understand or debug.
If I remove the foreign link it compiles as expected.
Side note: I've tried to use this library about 3 times and I always end up rolling my own errors or just using something like quick_error because of issues like this.
I'm probably just dumb?
The text was updated successfully, but these errors were encountered: