Skip to content

Commit 208e927

Browse files
committed
silence non-local impl definition warnings
1 parent f748610 commit 208e927

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lain_derive/src/dummy.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
use proc_macro2::{Ident, Span, TokenStream};
22

3-
use crate::internals::attr::unraw;
43
use quote::quote;
54

65
/// Wraps the code in a dummy const object. See https://github.com/serde-rs/serde/issues/159#issuecomment-214002626
7-
pub fn wrap_in_const(trait_: &str, ty: &Ident, code: TokenStream) -> TokenStream {
8-
let dummy_const = Ident::new(
9-
&format!("_IMPL_{}_FOR_{}", trait_, unraw(ty)),
10-
Span::call_site(),
11-
);
6+
pub fn wrap_in_const(_trait_: &str, _ty: &Ident, code: TokenStream) -> TokenStream {
7+
let dummy_const = Ident::new("_", Span::call_site());
128

139
let use_lain = quote! {
1410
#[allow(unknown_lints)]

0 commit comments

Comments
 (0)