From 6fd3e7b266bbc4a7bd7696c41de60246aa656fe8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 7 Oct 2024 12:47:20 +0200 Subject: [PATCH] codegen: allow(unreachable_patterns) ``` error: unreachable pattern --> relay-clients/client-polkadot/src/codegen_runtime.rs:5751:22 | 5751 | Void(runtime_types::sp_core::Void), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matches no values because `codegen_runtime::api::runtime_types::sp_core::Void` is uninhabited | = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types = note: `-D unreachable-patterns` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_patterns)]` ``` --- codegen/src/api/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index 2fed7a59ea..6f93a278b2 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -81,7 +81,7 @@ impl RuntimeGenerator { Ok(quote! { #( #item_mod_attrs )* - #[allow(dead_code, unused_imports, non_camel_case_types)] + #[allow(dead_code, unused_imports, non_camel_case_types, unreachable_patterns)] #[allow(clippy::all)] #[allow(rustdoc::broken_intra_doc_links)] pub mod #mod_ident { @@ -233,7 +233,7 @@ impl RuntimeGenerator { Ok(quote! { #( #item_mod_attrs )* - #[allow(dead_code, unused_imports, non_camel_case_types)] + #[allow(dead_code, unused_imports, non_camel_case_types, unreachable_patterns)] #[allow(clippy::all)] #[allow(rustdoc::broken_intra_doc_links)] pub mod #mod_ident {