mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Disable fixpoint for variance computation temporarily
This commit is contained in:
parent
6f9c62dfec
commit
7d51ec376a
@ -283,8 +283,9 @@ pub trait HirDatabase: DefDatabase + std::fmt::Debug {
|
||||
|
||||
#[salsa::invoke(crate::variance::variances_of)]
|
||||
#[salsa::cycle(
|
||||
cycle_fn = crate::variance::variances_of_cycle_fn,
|
||||
cycle_initial = crate::variance::variances_of_cycle_initial,
|
||||
// cycle_fn = crate::variance::variances_of_cycle_fn,
|
||||
// cycle_initial = crate::variance::variances_of_cycle_initial,
|
||||
cycle_result = crate::variance::variances_of_cycle_initial,
|
||||
)]
|
||||
fn variances_of(&self, def: GenericDefId) -> Option<Arc<[crate::variance::Variance]>>;
|
||||
|
||||
|
@ -22,7 +22,6 @@ use crate::{
|
||||
use chalk_ir::Mutability;
|
||||
use hir_def::signatures::StructFlags;
|
||||
use hir_def::{AdtId, GenericDefId, GenericParamId, VariantId};
|
||||
use salsa::CycleRecoveryAction;
|
||||
use std::fmt;
|
||||
use std::ops::Not;
|
||||
use stdx::never;
|
||||
@ -55,14 +54,14 @@ pub(crate) fn variances_of(db: &dyn HirDatabase, def: GenericDefId) -> Option<Ar
|
||||
variances.is_empty().not().then(|| Arc::from_iter(variances))
|
||||
}
|
||||
|
||||
pub(crate) fn variances_of_cycle_fn(
|
||||
_db: &dyn HirDatabase,
|
||||
_result: &Option<Arc<[Variance]>>,
|
||||
_count: u32,
|
||||
_def: GenericDefId,
|
||||
) -> CycleRecoveryAction<Option<Arc<[Variance]>>> {
|
||||
CycleRecoveryAction::Iterate
|
||||
}
|
||||
// pub(crate) fn variances_of_cycle_fn(
|
||||
// _db: &dyn HirDatabase,
|
||||
// _result: &Option<Arc<[Variance]>>,
|
||||
// _count: u32,
|
||||
// _def: GenericDefId,
|
||||
// ) -> salsa::CycleRecoveryAction<Option<Arc<[Variance]>>> {
|
||||
// salsa::CycleRecoveryAction::Iterate
|
||||
// }
|
||||
|
||||
pub(crate) fn variances_of_cycle_initial(
|
||||
db: &dyn HirDatabase,
|
||||
@ -966,7 +965,7 @@ struct S3<T>(S<T, T>);
|
||||
struct FixedPoint<T, U, V>(&'static FixedPoint<(), T, U>, V);
|
||||
"#,
|
||||
expect![[r#"
|
||||
FixedPoint[T: covariant, U: covariant, V: covariant]
|
||||
FixedPoint[T: bivariant, U: bivariant, V: bivariant]
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user