Make synstructure underscore_const(true) the default

since otherwise it will trigger the non_local_definitions lint
This commit is contained in:
Urgau
2024-01-28 13:50:06 +01:00
parent bccb9bbb41
commit c1144436f6
6 changed files with 24 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ use syn::parse_quote;
pub fn lift_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStream {
s.add_bounds(synstructure::AddBounds::Generics);
s.bind_with(|_| synstructure::BindStyle::Move);
s.underscore_const(true);
let tcx: syn::Lifetime = parse_quote!('tcx);
let newtcx: syn::GenericParam = parse_quote!('__lifted);