Hello. I'm writing a macro and want to instantiate a struct by calling Struct::new();
The problem is struct's name is dynamic and inside variable:
let struct_name = format!("QueryBuilderCake");
let gen = quote! {
#struct_name::new()
}
And for some reason I get an error:
^^^ expected one of
.,
;,
?,
}, or an operator
But if I replace it with QueryBuilderCake::new()
it will work just fine....