rust-lang-deprecated / error-chain

Error boilerplate for Rust
Apache License 2.0
728 stars 111 forks source link

Fix new macro import style #253

Closed faern closed 5 years ago

faern commented 5 years ago

Fixes #250

Uses the same approach as described here to make macros usable in both the new and old way of importing them: https://users.rust-lang.org/t/2018-edition-macro-ergonomics/18790

Issue #250 has become more of a problem now when Rust 1.30 is out and the new way of importing macros is out on the stable channel. Would be really good to have this, or a variant of this, merged and a 0.12.1 patch release published.

faern commented 5 years ago

I realized I forgot to add local_inner_macros on the ensure! macro. That has been fixed and pushed now.

I also dropped the commit I had that upgraded all examples to use the new import style, since it broke the Rust 1.14 build. I personally think the examples should reflect a more modern Rust style, but I'll go with this for now so the CI becomes happy at least.

faern commented 5 years ago

Ping? This crate will not be very ergonomic to use under Rust 2018 unless this is merged.

leo60228 commented 5 years ago

@Yamakaky is inactive, but @alexcrichton should be able to merge this too.

alexcrichton commented 5 years ago

Sorry but I don't maintain this crate

leo60228 commented 5 years ago

You're listed as an owner on https://crates.io. Is there anybody that's able to merge this?

alexcrichton commented 5 years ago

I am, yes, but I don't maintain this crate nor do I have time to