GithubHelp home page GithubHelp logo

Comments (11)

zimond avatar zimond commented on July 25, 2024 1

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.

zimond avatar zimond commented on July 25, 2024

ran into this too, so at least you are not alone

from error-chain.

Yamakaky avatar Yamakaky commented on July 25, 2024

Hum, in fact the quickstart is not outdated, it just compiles on master and not 0.6.

from error-chain.

colin-kiegel avatar colin-kiegel commented on July 25, 2024

This is a Problem with looking up docs on GitHub. I strongly recommend using docs.rs https://docs.rs/error-chain :-)

from error-chain.

m4b avatar m4b commented on July 25, 2024

@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.

Yamakaky avatar Yamakaky commented on July 25, 2024

I do, it's just that rust-lang/rust#15470

from error-chain.

Yamakaky avatar Yamakaky commented on July 25, 2024

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.

colin-kiegel avatar colin-kiegel commented on July 25, 2024

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.

Yamakaky avatar Yamakaky commented on July 25, 2024

Yeah, the link towards example.rs was added after 0.6.1.

I build the doc for master.

from error-chain.

m4b avatar m4b commented on July 25, 2024

I literally have no idea what's going on here but:

  1. Everything I said above is still correct
  2. @daiheitan suggestion to change to new syntax works (thank you)
  3. The example somehow compiles despite this
  4. 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.

Yamakaky avatar Yamakaky commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.