Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip info should evaluate and display constant expressions of types #10825

Open
Lokathor opened this issue Nov 21, 2021 · 1 comment
Open
Labels
A-hover hover feature A-ide general IDE features A-ty type system / type inference / traits / method resolution C-feature Category: feature request E-unknown It's unclear if the issue is E-hard or E-easy without digging in S-actionable Someone could pick this issue up and work on it right now

Comments

@Lokathor
Copy link

Given the following:

pub type Tile4 = [u32; (4 * 8 * 8) / 32];
pub type Charblock4 = [Tile4; 512];
  • If one hovers the mouse over Charblock4 you will see pub type Charblock8 = [Tile8; 256], the full type.
  • If one hovers the mouse over pub type Tile4 = [u32; _], which is missing the number of elements.

It would be greatly improved if the display could evaluate the expression and show that.
I completely understand if a full const evaluation engine can't be rigged into RA, but at least some const expressions (such as integer literal math) should be possible.

@Veykril
Copy link
Member

Veykril commented Dec 17, 2021

#10933 should bring us a bit closer to being able to do this

cc #8655

@Veykril Veykril added A-ide general IDE features A-ty type system / type inference / traits / method resolution C-feature Category: feature request E-unknown It's unclear if the issue is E-hard or E-easy without digging in S-actionable Someone could pick this issue up and work on it right now labels Dec 17, 2021
@Veykril Veykril added the A-hover hover feature label Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-hover hover feature A-ide general IDE features A-ty type system / type inference / traits / method resolution C-feature Category: feature request E-unknown It's unclear if the issue is E-hard or E-easy without digging in S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

2 participants