Comments (11)
Ok, I figured it out that the syntax has changed to:
foreign_links {
::std::io::Error, Io;
}
The quickstart's just outdated
from error-chain.
ran into this too, so at least you are not alone
from error-chain.
Hum, in fact the quickstart is not outdated, it just compiles on master and not 0.6.
from error-chain.
This is a Problem with looking up docs on GitHub. I strongly recommend using docs.rs https://docs.rs/error-chain :-)
from error-chain.
@colin-kiegel See above comment
Also the code is from an example file... (The link redirects to the examples/quickstart.rs
file)
from error-chain.
I do, it's just that rust-lang/rust#15470
from error-chain.
I could always copy it manually, but the advantage of examples/
is that it's compiled with cargo test
, so that it's never outdated. Any idea?
from error-chain.
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?
from error-chain.
Yeah, the link towards example.rs
was added after 0.6.1.
I build the doc for master
.
from error-chain.
I literally have no idea what's going on here but:
- Everything I said above is still correct
- @daiheitan suggestion to change to new syntax works (thank you)
- The example somehow compiles despite this
- I have no idea why
I'd suggest someone to fix the example to match the syntax in the docs. That's what I'd do.
from error-chain.
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.
I think that at next release, I will keep master
for the current release and indev
for the unreleased stuff. That way, when you go to the repo, you see the README for the latest release.
Sorry for the inconvenience.
from error-chain.
Related Issues (20)
- If this crate is really drepecate, I should specify it and mark alternatives. HOT 8
- cargo publish error HOT 3
- deprecate quick_main?
- trait objects without an explicit `dyn` are deprecated
- changes to backtrace crate HOT 1
- Shouldn't src/bin/has_backtrace.rs be in examples? HOT 1
- How to implement complex display expression?
- backtrace name collision HOT 1
- use of deprecated try
- minimum version 1.13 for ? operator HOT 1
- How to force documentation when using error_chain HOT 5
- Move Repository To rust-lang
- lint error: use of deprecated item 'std::error::Error::description': use the Display impl or to_string() HOT 2
- Rust 2018 macro export pain HOT 3
- gcc error while testing HOT 3
- Release 0.12.2? HOT 8
- Chaining errors from spawned threads.
- Use feature specific links in error_chain! macro
- Add a feature gate to call DebugBreak on construction
- no rules expected this token in macro call HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from error-chain.