Skip to content

Commit

Permalink
Relax 'static bound on tuples & Type macro
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Dec 25, 2023
1 parent a75f219 commit 45ee675
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions macros/src/type/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ pub fn add_type_to_where_clause(ty: &TokenStream, generics: &Generics) -> Option
return generics.where_clause.clone();
}
match generics.where_clause {
None => Some(parse_quote! { where #( #generic_types : #ty + 'static ),* }),
None => Some(parse_quote! { where #( #generic_types : #ty ),* }),
Some(ref w) => {
let bounds = w.predicates.iter();
Some(parse_quote! { where #(#bounds,)* #( #generic_types : #ty + 'static ),* })
Some(parse_quote! { where #(#bounds,)* #( #generic_types : #ty ),* })
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/type/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ macro_rules! impl_primitives {
macro_rules! impl_tuple {
( impl $($i:ident),* ) => {
#[allow(non_snake_case)]
impl<$($i: Type + 'static),*> Type for ($($i,)*) {
impl<$($i: Type),*> Type for ($($i,)*) {
#[allow(unused)]
fn inline(type_map: &mut TypeMap, generics: &[DataType]) -> DataType {
let mut _generics = generics.iter();
Expand Down

0 comments on commit 45ee675

Please sign in to comment.