From ff2f562740a478e05551881f7355941c62dbfcc2 Mon Sep 17 00:00:00 2001 From: Alex Konradi Date: Mon, 4 Mar 2024 10:28:57 -0500 Subject: [PATCH] Don't name the output of the const block Don't name the output of the const block in which traits are implemented. This doesn't play well with Rust RFC 3373, and isn't necessary for correctness. Fixes #46 --- src/expand.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/expand.rs b/src/expand.rs index e448ab8..ffd5d87 100644 --- a/src/expand.rs +++ b/src/expand.rs @@ -19,10 +19,9 @@ pub(crate) fn derive(input: &DeriveInput) -> Result { }?; let helpers = specialization(); - let dummy_const = format_ident!("_DERIVE_Display_FOR_{}", input.ident); Ok(quote! { #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)] - const #dummy_const: () = { + const _: () = { #helpers #impls };