Enable clippy exhaustive_enums lint workspace-wide
This commit is contained in:
parent
6ee3955483
commit
245fe4deea
@ -11,6 +11,7 @@ ruma-clippy = """\
|
|||||||
-W clippy::dbg_macro \
|
-W clippy::dbg_macro \
|
||||||
-W clippy::disallowed_type \
|
-W clippy::disallowed_type \
|
||||||
-W clippy::empty_line_after_outer_attr \
|
-W clippy::empty_line_after_outer_attr \
|
||||||
|
-W clippy::exhaustive_enums \
|
||||||
-W clippy::exhaustive_structs \
|
-W clippy::exhaustive_structs \
|
||||||
-W clippy::inefficient_to_string \
|
-W clippy::inefficient_to_string \
|
||||||
-W clippy::macro_use_imports \
|
-W clippy::macro_use_imports \
|
||||||
|
@ -159,6 +159,7 @@ fn filter_input_attrs(attr: &Attribute) -> bool {
|
|||||||
|| attr.path.is_ident("cfg_attr")
|
|| attr.path.is_ident("cfg_attr")
|
||||||
|| attr.path.is_ident("serde")
|
|| attr.path.is_ident("serde")
|
||||||
|| attr.path.is_ident("non_exhaustive")
|
|| attr.path.is_ident("non_exhaustive")
|
||||||
|
|| attr.path.is_ident("allow")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn impl_outgoing_with_incoming_self(input: &DeriveInput, ruma_serde: &TokenStream) -> TokenStream {
|
fn impl_outgoing_with_incoming_self(input: &DeriveInput, ruma_serde: &TokenStream) -> TokenStream {
|
||||||
|
@ -27,6 +27,7 @@ pub struct OtherThing<'t> {
|
|||||||
|
|
||||||
#[derive(Outgoing)]
|
#[derive(Outgoing)]
|
||||||
#[incoming_derive(!Deserialize)]
|
#[incoming_derive(!Deserialize)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub struct FakeRequest<'a, T> {
|
pub struct FakeRequest<'a, T> {
|
||||||
pub abc: &'a str,
|
pub abc: &'a str,
|
||||||
pub thing: Thing<'a, T>,
|
pub thing: Thing<'a, T>,
|
||||||
@ -44,6 +45,7 @@ pub struct FakeRequest<'a, T> {
|
|||||||
|
|
||||||
#[derive(Outgoing)]
|
#[derive(Outgoing)]
|
||||||
#[incoming_derive(!Deserialize)]
|
#[incoming_derive(!Deserialize)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum EnumThing<'a, T> {
|
pub enum EnumThing<'a, T> {
|
||||||
Abc(&'a str),
|
Abc(&'a str),
|
||||||
Stuff(Thing<'a, T>),
|
Stuff(Thing<'a, T>),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user