diff options
Diffstat (limited to 'enumn')
-rw-r--r-- | enumn/src/lib.rs | 1 | ||||
-rw-r--r-- | enumn/src/tests.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/enumn/src/lib.rs b/enumn/src/lib.rs index f4c30a7..b928b11 100644 --- a/enumn/src/lib.rs +++ b/enumn/src/lib.rs @@ -182,6 +182,7 @@ fn testable_derive(input: DeriveInput) -> proc_macro2::TokenStream { }); quote! { + #[allow(non_upper_case_globals)] impl #ident { pub #signature -> Option<Self> { struct discriminant; diff --git a/enumn/src/tests.rs b/enumn/src/tests.rs index 0d9cb83..cf5dd42 100644 --- a/enumn/src/tests.rs +++ b/enumn/src/tests.rs @@ -17,6 +17,7 @@ fn test_repr() { }; let actual = crate::testable_derive(input); let expected = quote! { + #[allow(non_upper_case_globals)] impl E { pub fn n(value: u8) -> Option<Self> { struct discriminant; @@ -48,6 +49,7 @@ fn test_no_repr() { }; let actual = crate::testable_derive(input); let expected = quote! { + #[allow(non_upper_case_globals)] impl E { pub fn n<REPR: Into<i64>>(value: REPR) -> Option<Self> { struct discriminant; |