Fix new renamed_and_removed_lints warning (#247)
authorBenjamin Gill <github@bgill.eu>
Sat, 16 Jun 2018 11:59:44 +0000 (12:59 +0100)
committerXimin Luo <infinity0@debian.org>
Sun, 23 Sep 2018 17:16:53 +0000 (18:16 +0100)
I've verified that this now produces no warnings with Rust 1.26.1 and
1.28.0-nightly (c3b09c968 2018-05-27)

Gbp-Pq: Name u-0001-Fix-new-renamed_and_removed_lints-warning-247.patch

src/vendor/error-chain-0.11.0/src/error_chain.rs
src/vendor/error-chain-0.11.0/src/impl_error_chain_kind.rs
src/vendor/error-chain-0.11.0/src/lib.rs

index cbd42cd67eaf6e58bf09a230b614923eef9e75b3..0926c88892780882905aee28e2f25de8dc4fd9f2 100644 (file)
@@ -173,7 +173,7 @@ macro_rules! impl_error_chain_processed {
                 self.0.description()
             }
 
-            #[allow(unknown_lints, unused_doc_comment)]
+            #[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
             fn cause(&self) -> Option<&::std::error::Error> {
                 match self.1.next_error {
                     Some(ref c) => Some(&**c),
@@ -424,7 +424,7 @@ macro_rules! impl_extract_backtrace {
     ($error_name: ident
      $error_kind_name: ident
      $([$link_error_path: path, $(#[$meta_links: meta])*])*) => {
-        #[allow(unknown_lints, unused_doc_comment)]
+        #[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
         fn extract_backtrace(e: &(::std::error::Error + Send + 'static))
             -> Option<::std::sync::Arc<$crate::Backtrace>> {
             if let Some(e) = e.downcast_ref::<$error_name>() {
index d6c05c8a882b7f713b905d8db626e197a7d0193f..d5e266389cd66e9deb0e3c8e6060145d801b2556 100644 (file)
@@ -264,7 +264,7 @@ macro_rules! impl_error_chain_kind {
             $item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*}
         )*}
     ) => {
-        #[allow(unknown_lints, unused, unused_doc_comment)]
+        #[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
         impl ::std::fmt::Display for $name {
             fn fmt(&self, fmt: &mut ::std::fmt::Formatter)
                 -> ::std::fmt::Result
@@ -316,7 +316,7 @@ macro_rules! impl_error_chain_kind {
                 }
             }
         }*/
-        #[allow(unknown_lints, unused, unused_doc_comment)]
+        #[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
         impl $name {
             /// A string describing the error kind.
             pub fn description(&self) -> &str {
index d0881fcef1c1b9639c4132a9391a57f809b058ef..6421194f8ca8d1d091aa245e90e8c3dd77946813 100644 (file)
@@ -1,5 +1,4 @@
 #![deny(missing_docs)]
-#![allow(unknown_lints)] // to be removed when unused_doc_comments lints is merged
 #![doc(html_root_url = "https://docs.rs/error-chain/0.11.0")]
 
 //! A library for consistent and reliable error handling