Skip to content

Commit

Permalink
Don't name the output of the const block
Browse files Browse the repository at this point in the history
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 yaahc#46
  • Loading branch information
akonradi-signal committed Mar 4, 2024
1 parent f0b62a5 commit ff2f562
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ pub(crate) fn derive(input: &DeriveInput) -> Result<TokenStream> {
}?;

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
};
Expand Down

0 comments on commit ff2f562

Please sign in to comment.