Skip to content

Commit bbaa2ce

Browse files
committed
use a dummy const to support rustc <= 1.31
1 parent 12def53 commit bbaa2ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/expand.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ pub fn derive(input: &DeriveInput) -> Result<TokenStream> {
1111
}?;
1212

1313
let helpers = specialization();
14+
let dummy_const = format_ident!("_DERIVE_Display_FOR_{}", input.ident);
1415
Ok(quote! {
15-
const _: () = {
16+
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
17+
const #dummy_const: () = {
1618
#helpers
1719
#impls
1820
};

0 commit comments

Comments
 (0)