pub fn generate_unique_pattern(pat: Pat, counter: &mut u32) -> Pat {
	match pat {
		Pat::Wild(_) => {
			let generated_name = Ident::new(
				&format!("runtime_api_generated_name_{}", counter),
				pat.span()
			);
			*counter += 1;

			parse_quote!( #generated_name )
		},
		_ => pat,
	}
}
/// Generate an unique pattern based on the given counter, if the given pattern is a `_`.
Generate an unique pattern based on the given counter, if the given pattern is a `_`.
Generate an unique pattern based on the given counter if the given pattern is a ` _ ` .
pub fn generate_unique_pattern(pat: Pat, counter: &mut u32) -> Pat {
	match pat {
		Pat::Wild(_) => {
			let generated_name = Ident::new(
				&format!("runtime_api_generated_name_{}", counter),
				pat.span()
			);
			*counter += 1;
			parse_quote!( #generated_name )
		},
		_ => pat,
	}
}
pub fn generate_unique_pattern ( pat : Pat , counter : & mut u32 ) -> Pat { match pat { Pat :: Wild ( _ ) => { let generated_name = Ident :: new ( & format ! ( " " counter ) , pat . span ( ) ) ; * counter += 1 ; parse_quote ! ( generated_name ) } , _ => pat , } }
Generate an unique pattern based on the given counter, if the given pattern is a `_`.
Generate an unique pattern based on the given counter if the given pattern is a ` _ ` .
pat
Pat
counter
&mut u32
pat
Pat
counter
&mut u32