From 107c47da0f399dedecf29bf1b0c023e0e539b6c7 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 27 Jul 2017 22:30:32 +0200 Subject: [PATCH 1/2] Fix rustc build --- src/error_chain.rs | 2 ++ src/quick_error.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/error_chain.rs b/src/error_chain.rs index ef1ae2de9..7d4aa7538 100644 --- a/src/error_chain.rs +++ b/src/error_chain.rs @@ -172,6 +172,7 @@ macro_rules! error_chain_processed { self.0.description() } + #[allow(unused_doc_comment)] fn cause(&self) -> Option<&::std::error::Error> { match self.1.next_error { Some(ref c) => Some(&**c), @@ -423,6 +424,7 @@ macro_rules! impl_extract_backtrace { ($error_name: ident $error_kind_name: ident $([$link_error_path: path, $(#[$meta_links: meta])*])*) => { + #[allow(unused_doc_comment)] fn extract_backtrace(e: &(::std::error::Error + Send + 'static)) -> Option<::std::sync::Arc<$crate::Backtrace>> { if let Some(e) = e.downcast_ref::<$error_name>() { diff --git a/src/quick_error.rs b/src/quick_error.rs index 32565ca4c..c38f50c8f 100644 --- a/src/quick_error.rs +++ b/src/quick_error.rs @@ -260,7 +260,7 @@ macro_rules! quick_error { $item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*} )*} ) => { - #[allow(unused)] + #[allow(unused, unused_doc_comment)] impl ::std::fmt::Display for $name { fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result @@ -310,7 +310,7 @@ macro_rules! quick_error { } } }*/ - #[allow(unused)] + #[allow(unused, unused_doc_comment)] impl $name { /// A string describing the error kind. pub fn description(&self) -> &str { From 00dfe9b803408876ef5aebd1a75358a88985b646 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 27 Jul 2017 23:23:14 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 668dadbd7..b00fda589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [Add a new method for `Error`: `chain_err`.](https://github.com/brson/error-chain/pull/141) - [Allow `chain_err` to be used on `Option`](https://github.com/brson/error-chain/pull/156) - [Add support for creating an error chain on boxed trait errors (`Box`)](https://github.com/brson/error-chain/pull/156) +- [Remove lint for unused doc comment.](https://github.com/brson/error-chain/pull/199) # 0.10.0