Skip to content

Commit

Permalink
codegen: allow(unreachable_patterns)
Browse files Browse the repository at this point in the history
```
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)]`
```
  • Loading branch information
bkontur authored Oct 7, 2024
1 parent 73ae066 commit 6fd3e7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codegen/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6fd3e7b

Please sign in to comment.