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.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir-ty/src/infer/diagnostics.rs b/crates/hir-ty/src/infer/diagnostics.rs index f613e2f69f..2c633a03c5 100644 --- a/crates/hir-ty/src/infer/diagnostics.rs +++ b/crates/hir-ty/src/infer/diagnostics.rs @@ -12,6 +12,7 @@ use hir_def::expr_store::path::Path; use hir_def::{hir::ExprOrPatId, resolver::Resolver}; use la_arena::{Idx, RawIdx}; +use crate::lower::GenericArgsPosition; use crate::{ InferenceDiagnostic, InferenceTyDiagnosticSource, TyLoweringContext, TyLoweringDiagnostic, db::HirDatabase, @@ -74,6 +75,7 @@ impl<'a> InferenceTyLoweringContext<'a> { &'b mut self, path: &'b Path, node: ExprOrPatId, + position: GenericArgsPosition, ) -> PathLoweringContext<'b, 'a> { let on_diagnostic = PathDiagnosticCallback { data: Either::Right(PathDiagnosticCallbackData { diagnostics: self.diagnostics, node }), @@ -83,13 +85,14 @@ impl<'a> InferenceTyLoweringContext<'a> { .push(InferenceDiagnostic::PathDiagnostic { node: data.node, diag }); }, }; - PathLoweringContext::new(&mut self.ctx, on_diagnostic, path) + PathLoweringContext::new(&mut self.ctx, on_diagnostic, path, position) } #[inline] pub(super) fn at_path_forget_diagnostics<'b>( &'b mut self, path: &'b Path, + position: GenericArgsPosition, ) -> PathLoweringContext<'b, 'a> { let on_diagnostic = PathDiagnosticCallback { data: Either::Right(PathDiagnosticCallbackData { @@ -98,7 +101,7 @@ impl<'a> InferenceTyLoweringContext<'a> { }), callback: |_data, _, _diag| {}, }; - PathLoweringContext::new(&mut self.ctx, on_diagnostic, path) + PathLoweringContext::new(&mut self.ctx, on_diagnostic, path, position) } #[inline] |