Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

example seems broken #70

Closed
Closed
@m4b

Description

@m4b

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 inside errors.rs:

error_chain! {
    foreign_links {
        // An IO error can occur.
        Io(::std::io::Error);
    }
}

this won't compile with:

error: no rules expected the token `;`
 --> <error_chain macros>:8:42
  |
8 | types { $ error_name , $ error_kind_name ; } $ ( $ rest ) * }
  |                                          ^

error: Could not compile `goblin`.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions