Crate quote: turn type to turbofish syntax

I'm generating some codes by using proc and quote crate, and there is one line cased a problem:

let a = Vec<i32>::Value && true;

in this case, I should use Vec::<i32>::Value, but this code is generated by using #ty::Value, so any way I can tell quote to turn #ty to turbofish syntax?

1 Like

I found a solution, which is wrapping the type in a <>, in my case: let a = <Vec<i32>>::Value && true;, but still curious about the turbofish solution.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.