Stream: t-compiler/rust-analyzer

Topic: Metrics broken again


Lukas Wirth (Dec 12 2020 at 18:36, on Zulip):

Looks like my hir::Lifetime PR broke something? :sweat_smile: https://github.com/rust-analyzer/rust-analyzer/runs/1542577056#step:4:392

Lukas Wirth (Dec 12 2020 at 18:37, on Zulip):

at least it seems this started appearing after that PR got merged

Lukas Wirth (Dec 12 2020 at 18:56, on Zulip):

Ah I think it because of this part here. My PR changes the number of where predicates but most of the Generics logic only works with the types part of generics directly https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/utils.rs#L191-L244 and it builds indices based on just those. I believe this might cause the problems here by breaking the index assumptions, but I'm not sure

Jonas Schievink [he/him] (Dec 13 2020 at 00:11, on Zulip):

perhaps running rust-analyzer diagnostics . in CI would help catch cases like this?

matklad (Dec 13 2020 at 07:27, on Zulip):

@Jonas Schievink the problem with that is that's too slow in debug and too slow to build in release

Lukas Wirth (Dec 13 2020 at 10:23, on Zulip):

Okay found the "problem line of code", commenting out this line prevents the oob panic https://github.com/rust-analyzer/rust-analyzer/blob/a15d19619e097b14b670064a4edc054a4251f479/crates/hir_def/src/path/lower.rs#L176

Lukas Wirth (Dec 13 2020 at 10:39, on Zulip):

#6852 should fix this by just ignoring lifetime params for now as I'm not sure how substitutions should handle them otherwise.

Last update: Jul 29 2021 at 22:45UTC