Expand description
Module for inferring the variance of type and lifetime parameters. See the rustc dev guide chapter for more info.
The implementation here differs from rustc. Rustc does a crate wide fixpoint resolution as the algorithm for determining variance is a fixpoint computation with potential cycles that need to be resolved. rust-analyzer does not want a crate-wide analysis though as that would hurt incrementality too much and as such our query is based on a per item basis.
This does unfortunately run into the issue that we can run into query cycles which salsa currently does not allow to be resolved via a fixpoint computation. This will likely be resolved by the next salsa version. If not, we will likely have to adapt and go with the rustc approach while installing firewall per item queries to prevent invalidation issues.
Structsยง
- Context ๐
Functionsยง
- glb ๐
- variances_
of ๐ - variances_
of_ ๐cycle_ fn - variances_
of_ ๐cycle_ initial - variances_
of_ ๐query