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

Commit 63653c8

Browse files
authored
Merge pull request #252 from zserik/issue251
with rustc 1.27.0 (and probably 1.28.0, too), which doesn't apply the (#allow) unknown_lints, renamed_and_removed_lints to unused_doc_comment, unused_doc_comments, when these lints-to-ignore are in the same line
2 parents bbadb12 + 7866746 commit 63653c8

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/error_chain.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ macro_rules! impl_error_chain_cause_or_source {
1212
$( #[$meta_foreign_links:meta] )*; )*
1313
}
1414
) => {
15-
#[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
15+
#[allow(unknown_lints, renamed_and_removed_lints)]
16+
#[allow(unused_doc_comment, unused_doc_comments)]
1617
fn cause(&self) -> Option<&::std::error::Error> {
1718
match self.1.next_error {
1819
Some(ref c) => Some(&**c),
@@ -46,8 +47,8 @@ macro_rules! impl_error_chain_cause_or_source {
4647
$( #[$meta_foreign_links:meta] )*; )*
4748
}
4849
) => {
49-
50-
#[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
50+
#[allow(unknown_lints, renamed_and_removed_lints)]
51+
#[allow(unused_doc_comment, unused_doc_comments)]
5152
fn source(&self) -> Option<&(std::error::Error + 'static)> {
5253
match self.1.next_error {
5354
Some(ref c) => Some(&**c),
@@ -521,7 +522,8 @@ macro_rules! impl_extract_backtrace {
521522
($error_name: ident
522523
$error_kind_name: ident
523524
$([$link_error_path: path, $(#[$meta_links: meta])*])*) => {
524-
#[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
525+
#[allow(unknown_lints, renamed_and_removed_lints)]
526+
#[allow(unused_doc_comment, unused_doc_comments)]
525527
fn extract_backtrace(e: &(::std::error::Error + Send + 'static))
526528
-> Option<$crate::InternalBacktrace> {
527529
if let Some(e) = e.downcast_ref::<$error_name>() {

src/impl_error_chain_kind.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ macro_rules! stringify_internal {
1212
($($t:tt)*) => { stringify!($($t)*) }
1313
}
1414

15-
/// Macro used interally for output expanding an expression
15+
/// Macro used interally for output expanding an expression
1616
#[macro_export]
1717
macro_rules! write_internal {
1818
($dst:expr, $($arg:tt)*) => (write!($dst, $($arg)*))
@@ -239,7 +239,8 @@ macro_rules! impl_error_chain_kind {
239239
$item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*}
240240
)*}
241241
) => {
242-
#[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
242+
#[allow(unknown_lints, unused, renamed_and_removed_lints)]
243+
#[allow(unused_doc_comment, unused_doc_comments)]
243244
impl ::std::fmt::Display for $name {
244245
fn fmt(&self, fmt: &mut ::std::fmt::Formatter)
245246
-> ::std::fmt::Result
@@ -262,7 +263,8 @@ macro_rules! impl_error_chain_kind {
262263
}
263264
}
264265
}
265-
#[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
266+
#[allow(unknown_lints, unused, renamed_and_removed_lints)]
267+
#[allow(unused_doc_comment, unused_doc_comments)]
266268
impl $name {
267269
/// A string describing the error kind.
268270
pub fn description(&self) -> &str {

0 commit comments

Comments
 (0)