Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/diagnostics.rs')
-rw-r--r--crates/hir-ty/src/infer/diagnostics.rs19
1 files changed, 14 insertions, 5 deletions
diff --git a/crates/hir-ty/src/infer/diagnostics.rs b/crates/hir-ty/src/infer/diagnostics.rs
index e4f5b5ed37..e3c4f5562d 100644
--- a/crates/hir-ty/src/infer/diagnostics.rs
+++ b/crates/hir-ty/src/infer/diagnostics.rs
@@ -6,13 +6,17 @@ use std::cell::RefCell;
use std::ops::{Deref, DerefMut};
use either::Either;
-use hir_def::{hir::ExprOrPatId, path::Path, resolver::Resolver, type_ref::TypesMap, TypeOwnerId};
+use hir_def::GenericDefId;
+use hir_def::expr_store::ExpressionStore;
+use hir_def::expr_store::path::Path;
+use hir_def::{hir::ExprOrPatId, resolver::Resolver};
use la_arena::{Idx, RawIdx};
+use crate::lower::LifetimeElisionKind;
use crate::{
+ InferenceDiagnostic, InferenceTyDiagnosticSource, TyLoweringContext, TyLoweringDiagnostic,
db::HirDatabase,
lower::path::{PathDiagnosticCallback, PathLoweringContext},
- InferenceDiagnostic, InferenceTyDiagnosticSource, TyLoweringContext, TyLoweringDiagnostic,
};
// Unfortunately, this struct needs to use interior mutability (but we encapsulate it)
@@ -58,12 +62,17 @@ impl<'a> InferenceTyLoweringContext<'a> {
pub(super) fn new(
db: &'a dyn HirDatabase,
resolver: &'a Resolver,
- types_map: &'a TypesMap,
- owner: TypeOwnerId,
+ store: &'a ExpressionStore,
diagnostics: &'a Diagnostics,
source: InferenceTyDiagnosticSource,
+ generic_def: GenericDefId,
+ lifetime_elision: LifetimeElisionKind,
) -> Self {
- Self { ctx: TyLoweringContext::new(db, resolver, types_map, owner), diagnostics, source }
+ Self {
+ ctx: TyLoweringContext::new(db, resolver, store, generic_def, lifetime_elision),
+ diagnostics,
+ source,
+ }
}
#[inline]