Enable clippy exhaustive_enums lint workspace-wide

This commit is contained in:
Devin Ragotzy 2021-07-04 07:39:11 -07:00 committed by Jonas Platte
parent 6ee3955483
commit 245fe4deea
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
3 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ ruma-clippy = """\
-W clippy::dbg_macro \
-W clippy::disallowed_type \
-W clippy::empty_line_after_outer_attr \
-W clippy::exhaustive_enums \
-W clippy::exhaustive_structs \
-W clippy::inefficient_to_string \
-W clippy::macro_use_imports \

View File

@ -159,6 +159,7 @@ fn filter_input_attrs(attr: &Attribute) -> bool {
|| attr.path.is_ident("cfg_attr")
|| attr.path.is_ident("serde")
|| attr.path.is_ident("non_exhaustive")
|| attr.path.is_ident("allow")
}
fn impl_outgoing_with_incoming_self(input: &DeriveInput, ruma_serde: &TokenStream) -> TokenStream {

View File

@ -27,6 +27,7 @@ pub struct OtherThing<'t> {
#[derive(Outgoing)]
#[incoming_derive(!Deserialize)]
#[non_exhaustive]
pub struct FakeRequest<'a, T> {
pub abc: &'a str,
pub thing: Thing<'a, T>,
@ -44,6 +45,7 @@ pub struct FakeRequest<'a, T> {
#[derive(Outgoing)]
#[incoming_derive(!Deserialize)]
#[non_exhaustive]
pub enum EnumThing<'a, T> {
Abc(&'a str),
Stuff(Thing<'a, T>),