Interpolate string variable without quotes
danielblignaut opened this issue · 3 comments
danielblignaut commented
Hi,
Is there a way to render the contents of a rust variables (which is a String type) but without the surrounding quotes? Similar to if I just had
quote! {
raw_value
}
would output: raw_value
...
I'm looking for
let custom_variable: String = "raw_value"
quote! {
#custom_variable
}
would also output: raw_value where
I've tried all sort of String to static string conversions, attempted implementing my own language but just can't get it to work.
danielblignaut commented
Hi @udoprog ,
So I have the interpolation working in both v16 and v17 (changing # for $). But the interpolated string has quotes generated around it when it's outputted. I am trying to avoid the quotes being added. Is this possible?