Stream: t-compiler/rust-analyzer

Topic: let ident: &{unknown} = ...;

pnkfelix (Jan 13 2020 at 16:50, on Zulip):

If I see &{unknown} as the inferred type (and I've let the source sit idle for long enough that I imagine any pending analysis has completed), is that always a sign of some bug in Rust Analyzer? Or are there accepted limitations in its type inference that imply we do not classify such things as bugs, at least for now?

Florian Diebold (Jan 13 2020 at 16:53, on Zulip):

I would classify it as a bug, yes

Florian Diebold (Jan 13 2020 at 16:54, on Zulip):

it will likely be one of a number of known limitations or not-yet-implemented features, but maybe it isn't ;)

matklad (Jan 13 2020 at 16:55, on Zulip):

@Florian Diebold don't we also produce legitimate unkonwns for type errors?

matklad (Jan 13 2020 at 16:56, on Zulip):

Ie, another condition to classsify it is a bug would be that the code actually compiles

Florian Diebold (Jan 13 2020 at 16:58, on Zulip):

ok yeah, assuming the compiler accepts the code

pnkfelix (Jan 13 2020 at 17:03, on Zulip):

(oh right, yeah; this is rustc-accepted code. Namely, its rustc itself...)

pnkfelix (Jan 13 2020 at 17:03, on Zulip):

so I'm not likely to reduce it down to a bug I can file anytime soon. Just curious.

Florian Diebold (Jan 13 2020 at 17:06, on Zulip):

I think the biggest single source of unknowns currently are probably associated types, but there are also lots of other possible reasons (local imports, procedural macros, various missing details in trait solving and macro expansion)

Last update: Jul 26 2021 at 14:00UTC