-
Notifications
You must be signed in to change notification settings - Fork 111
Use Error::description only for rust below 1.42 #285
Use Error::description only for rust below 1.42 #285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From your three PRs, I think this is the best solution and what we should do! I only left one inline comment.
fd24f31
to
6ff71d8
Compare
I'm a fan of this approach. |
#[doc(hidden)] | ||
#[cfg(not(has_error_description_deprecated))] | ||
#[macro_export(local_inner_macros)] | ||
macro_rules! call_to_deprecated_description { | ||
($e:ident) => { ::std::error::Error::description($e) }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need a doc comment, too? Wouldn't #![deny(missing_documentation)]
trigger in case not(has_error_description_deprecated)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why CI fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, it fails and reverted it back
6ff71d8
to
11dd09a
Compare
11dd09a
to
c1018b6
Compare
Any chance of a release containing this fix? Thanks |
Yeah, give me a week or two, but I will release it. |
@AndyGauge Ping regarding release. People start noticing this on stable (#286). Thanks! :) |
shoot you are right, I'm behind on this. Tomorrow. |
🎉 0.12.2 is on crates.io Let me know if it breaks production 😉 |
Error::description
has been documented as soft-deprecated since 1.27.0 (17 months ago). It is going to be hard-deprecated soon (1.42)This PR:
has_error_description_deprecated
impl_error_chain_kind
without usage ofError::description
Related PR: rust-lang/rust#66919
Alternative PR(with removed description): #283