How to convert a hir::Type to ast::Type?
I don't think it's possible? One is a type as in "
42i32 is of type
i32" while the other one is a piece of syntax, as in
I am working on assist generate function. Trying to make it infer the return type. I don't know how to quote the function because make::fn_ doesn't accept a return type
Ah, I'm not sure, but you might need to go through the textual representation
make::ty which gives you an
Also should I modify make::fn_ to take a return type
And you can pretty-print a
That sounds reasonable
you should use
display_source_code though, not
display. The former is specifically for printing a valid source code representation