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

Please support older versions of Rust #101

Closed
joshtriplett opened this issue Dec 24, 2016 · 7 comments
Closed

Please support older versions of Rust #101

joshtriplett opened this issue Dec 24, 2016 · 7 comments

Comments

@joshtriplett
Copy link
Contributor

I'd like to use error-chain as part of the dependencies for a project, but that project needs to support Rust 1.10. error-chain uses the ability to put attributes on non-item statements and expressions, specifically to handle the backtrace feature. Please consider moving those attributes upward (even though it duplicates a bit more code), to allow error-chain to build and run on Rust 1.10.

@joshtriplett
Copy link
Contributor Author

Currently working on a patch for this.

@Yamakaky
Copy link
Contributor

Cool!

@joshtriplett
Copy link
Contributor Author

joshtriplett commented Dec 25, 2016

Mostly there; ran into what seems like a bug in #[derive(Debug)] in Rust 1.10. Trying to debug Debug.

See https://is.gd/yDJ60j for a test case.

@joshtriplett
Copy link
Contributor Author

I think I ran into rust-lang/rust#22250 , fixed in Rust 1.11.

@joshtriplett
Copy link
Contributor Author

joshtriplett commented Dec 25, 2016

#103 fixes this enough for some use cases. I don't see any obvious way to get backtrace working without statement blocks, and I don't want to add a pile of conditionals to make a subset of the tests work (avoiding all tests that use #[cfg(...)] on variants within error_chain!), but the crate itself works perfectly with #103.

I submitted the work in progress to make the tests and examples work as #104 for reference, just so that work doesn't get lost if anyone else wants to try it.

@joshtriplett
Copy link
Contributor Author

joshtriplett commented Dec 25, 2016

Thanks for all the quick responses on #103.

@Yamakaky
Copy link
Contributor

0.7.2 released.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants