{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreihc522ek2l25rejq6het6p4nqeez3k7ihiy7ep5vmdyacqxe65awa",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mlj44z4p6342"
},
"path": "/t/type-inference-failure-when-accessing-a-value-before-its-type-is-resolved/24232#post_9",
"publishedAt": "2026-05-10T14:36:45.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "rxdiscovery:\n\n> This would be a welcome improvement.\n\nUnfortunately the impact on compiler performance is unknown, and is likely to be large (unless someone will put a PR proving otherwise, of course). This likely will be rejected on that basis alone, given that the current state of things is not that bad.\n\nrust-analyzer showing the type is because the type can be inferred at the end, and yes it's confusing, although I'm unsure how r-a could do better (displaying the type is definitely wanted, as it also impacts other IDE features such as inserting the type. Also, _not_ displaying the type is quite difficult). This can even manifest in r-a errors (as \"type `Type` does not have a method/field X\", when it clearly has), and that is extra confusing and something we should fix.",
"title": "Type inference failure when accessing a value before its type is resolved"
}