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

hovering complete template specializations does not show memory layout info #15010

Open
adenine-dev opened this issue Jun 8, 2023 · 1 comment
Labels
A-ide general IDE features A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@adenine-dev
Copy link
Contributor

rust-analyzer version: 0.3.1541-standalone (2f1b7ce 2023-06-04)

rustc version: rustc 1.72.0-nightly (a97c36dd2 2023-06-07)

relevant settings: Check command is clippy, all other RA settings are default.

to replicate:

struct X { // hover over `X` and you get "// size = 8, align = 0x8"
    x: Box<f32>, // hover over `Box`, no layout data
}

I believe this is because the template args are not being taken into account on hover so instead of it being Box<f32> it's just Box. Not sure if this is intended behavior but seems like an oversight to not have that info available.

@adenine-dev adenine-dev added the C-bug Category: bug label Jun 8, 2023
@Veykril
Copy link
Member

Veykril commented Jun 8, 2023

it's definitely something we want to support, but that requires some bigger changes. Most of the ide featurse that work in those positions forget about substitutions.

@lnicola lnicola added the A-ty type system / type inference / traits / method resolution label Jun 8, 2023
@Veykril Veykril added the A-ide general IDE features label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants