Closed
Description
Improvement for #10441
struct Struct<T, U>(T, U);
enum Enum {
Variant(u32)
}
fn main() {
let foo = Struct::<u32, u32>(0, 0);
let foo = Enum::Variant(0);
}
This will currently give type hints for the two let bindings but ideally we shouldn't need to show these here either.
This should be simple to fix, for the enum case we just need to special case a branch here https://github.com/rust-analyzer/rust-analyzer/blob/4b7675fcc30d3e2c05eafc68a5724db66b58142c/crates/ide/src/inlay_hints.rs#L268-L274
to instead check for the paths qualifier segment instead of the immediate, that is check the enum part instead of the variant.
For the tuple struct part we need to basically just do whats being down a few lines below that snippet for the immediate path segment instead of the qualifier.