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

Allow deprecated Error::description #284

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/error_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ macro_rules! impl_error_chain_processed {
}

impl ::std::error::Error for $error_name {
#[allow(deprecated)]
fn description(&self) -> &str {
self.description()
}
Expand Down Expand Up @@ -356,6 +357,7 @@ macro_rules! impl_error_chain_processed {

impl_error_chain_kind! {
/// The kind of an error.
#[allow(deprecated)]
#[derive(Debug)]
pub enum $error_kind_name {
$(
Expand All @@ -369,6 +371,7 @@ macro_rules! impl_error_chain_processed {
$(
$(#[$meta_foreign_links])*
$foreign_link_variant(err: $foreign_link_error_path) {
#[allow(deprecated)]
description(::std::error::Error::description(err))
display("{}", err)
}
Expand Down