derive-error
derive-error copied to clipboard
Rust 2018 support: `crate::`
Attempting to compile this (notice crate:: prefix in Error):
#[macro_use]
extern crate derive_error;
#[derive(Error)]
pub enum Err {
A
}
#[derive(Error)]
pub enum Error {
SomeErr(crate::Err),
}
results in the following failure:
help: message: failed to parse the error defination: "failed to parse derive input: \"pub enum Error { SomeErr(crate::Err), }\""
I tried upgrading syn/quote in derive-error but there seem to be breaking changes so I didn't follow through yet.
This will require updating syn to 0.15. Your current version is from before crate:: was introduced to Rust.
This is exactly what I tried to do, but since it wasn't a straightforward upgrade, I didn't follow through yet.