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

try to fix issue #251 #252

Merged
merged 2 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions src/error_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ macro_rules! impl_error_chain_cause_or_source {
$( #[$meta_foreign_links:meta] )*; )*
}
) => {
#[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
#[allow(unknown_lints, renamed_and_removed_lints)]
#[allow(unused_doc_comment, unused_doc_comments)]
fn cause(&self) -> Option<&::std::error::Error> {
match self.1.next_error {
Some(ref c) => Some(&**c),
Expand Down Expand Up @@ -46,8 +47,8 @@ macro_rules! impl_error_chain_cause_or_source {
$( #[$meta_foreign_links:meta] )*; )*
}
) => {

#[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
#[allow(unknown_lints, renamed_and_removed_lints)]
#[allow(unused_doc_comment, unused_doc_comments)]
fn source(&self) -> Option<&(std::error::Error + 'static)> {
match self.1.next_error {
Some(ref c) => Some(&**c),
Expand Down Expand Up @@ -482,7 +483,8 @@ macro_rules! impl_extract_backtrace {
($error_name: ident
$error_kind_name: ident
$([$link_error_path: path, $(#[$meta_links: meta])*])*) => {
#[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
#[allow(unknown_lints, renamed_and_removed_lints)]
#[allow(unused_doc_comment, unused_doc_comments)]
fn extract_backtrace(e: &(::std::error::Error + Send + 'static))
-> Option<$crate::InternalBacktrace> {
if let Some(e) = e.downcast_ref::<$error_name>() {
Expand Down
8 changes: 5 additions & 3 deletions src/impl_error_chain_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ macro_rules! stringify_internal {
($($t:tt)*) => { stringify!($($t)*) }
}

/// Macro used interally for output expanding an expression
/// Macro used interally for output expanding an expression
#[macro_export]
macro_rules! write_internal {
($dst:expr, $($arg:tt)*) => (write!($dst, $($arg)*))
Expand Down Expand Up @@ -239,7 +239,8 @@ macro_rules! impl_error_chain_kind {
$item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*}
)*}
) => {
#[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
#[allow(unknown_lints, unused, renamed_and_removed_lints)]
#[allow(unused_doc_comment, unused_doc_comments)]
impl ::std::fmt::Display for $name {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter)
-> ::std::fmt::Result
Expand All @@ -262,7 +263,8 @@ macro_rules! impl_error_chain_kind {
}
}
}
#[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
#[allow(unknown_lints, unused, renamed_and_removed_lints)]
#[allow(unused_doc_comment, unused_doc_comments)]
impl $name {
/// A string describing the error kind.
pub fn description(&self) -> &str {
Expand Down