Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/closure/analysis.rs')
| -rw-r--r-- | crates/hir-ty/src/infer/closure/analysis.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/hir-ty/src/infer/closure/analysis.rs b/crates/hir-ty/src/infer/closure/analysis.rs index 944b3594ba..251e7f7cf6 100644 --- a/crates/hir-ty/src/infer/closure/analysis.rs +++ b/crates/hir-ty/src/infer/closure/analysis.rs @@ -31,10 +31,10 @@ use crate::{ // The below functions handle capture and closure kind (Fn, FnMut, ..) -#[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, PartialEq, Eq, Hash, salsa::Update)] pub(crate) struct HirPlace<'db> { pub(crate) local: BindingId, - pub(crate) projections: Vec<ProjectionElem<Infallible, Ty<'db>>>, + pub(crate) projections: Vec<ProjectionElem<'db, Infallible>>, } impl<'db> HirPlace<'db> { @@ -76,7 +76,7 @@ pub enum CaptureKind { ByValue, } -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq, Eq, salsa::Update)] pub struct CapturedItem<'db> { pub(crate) place: HirPlace<'db>, pub(crate) kind: CaptureKind, @@ -87,6 +87,7 @@ pub struct CapturedItem<'db> { /// copy all captures of the inner closure to the outer closure, and then we may /// truncate them, and we want the correct span to be reported. span_stacks: SmallVec<[SmallVec<[MirSpan; 3]>; 3]>, + #[update(unsafe(with(crate::utils::unsafe_update_eq)))] pub(crate) ty: EarlyBinder<'db, Ty<'db>>, } @@ -101,7 +102,7 @@ impl<'db> CapturedItem<'db> { } pub fn ty(&self, db: &'db dyn HirDatabase, subst: GenericArgs<'db>) -> Ty<'db> { - let interner = DbInterner::new_with(db, None, None); + let interner = DbInterner::new_no_crate(db); self.ty.instantiate(interner, subst.split_closure_args_untupled().parent_args) } |