Looks like my hir::Lifetime PR broke something? :sweat_smile: https://github.com/rust-analyzer/rust-analyzer/runs/1542577056#step:4:392
at least it seems this started appearing after that PR got merged
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
rust-analyzer diagnostics . in CI would help catch cases like this?
@Jonas Schievink the problem with that is that's too slow in debug and too slow to build in release
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
#6852 should fix this by just ignoring lifetime params for now as I'm not sure how substitutions should handle them otherwise.