From 6f02befee4249618a2a7858d27649fa389888ea8 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 24 Jul 2020 16:30:12 +0200 Subject: Add a builder for DiagnosticSink --- crates/ra_hir_ty/src/diagnostics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_ty/src') diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index d3ee9cf55..a9877d867 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs @@ -248,7 +248,7 @@ impl AstDiagnostic for MismatchedArgCount { #[cfg(test)] mod tests { use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId}; - use hir_expand::diagnostics::{Diagnostic, DiagnosticSink}; + use hir_expand::diagnostics::{Diagnostic, DiagnosticSinkBuilder}; use ra_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt}; use ra_syntax::{TextRange, TextSize}; use rustc_hash::FxHashMap; @@ -280,7 +280,7 @@ mod tests { } for f in fns { - let mut sink = DiagnosticSink::new(&mut cb); + let mut sink = DiagnosticSinkBuilder::new().build(&mut cb); validate_body(self, f.into(), &mut sink); } } -- cgit v1.2.3