You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask for textDocument/hover support for constants defined with const fn. In my example below, you can see that an add function works, but not usize.ilog2().
Works as expected
pubconstfnadd(a:u32,b:u32) -> u32{ a + b }pubconstADD_EXAMPLE:u32 = add(2,3);
We have a custom MIR lowering and evaluation. We show the value if we can evaluate the constant. I haven't looked where exactly we fail for ilog2(), but we just need to extend our supported set of operations for that. So this isn't really a feature request, more like an in-progress feature.
I would like to ask for
textDocument/hover
support for constants defined withconst fn
. In my example below, you can see that anadd
function works, but not usize.ilog2().Works as expected
Hovering over
ADD_EXAMPLE
shows5
as expected...Feature request
But hovering over
ILOG2_EXAMPLE
currently shows:ilog2(16)
instead of4
...Background
I have an application where I define constants based on usize.ilog2() and I like to sanity check the results in my editor.
The text was updated successfully, but these errors were encountered: