aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/test_db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/test_db.rs')
-rw-r--r--crates/ra_hir_ty/src/test_db.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs
index 5bbeabf51..208096aab 100644
--- a/crates/ra_hir_ty/src/test_db.rs
+++ b/crates/ra_hir_ty/src/test_db.rs
@@ -10,6 +10,7 @@ use hir_expand::{db::AstDatabase, diagnostics::DiagnosticSink};
10use ra_db::{ 10use ra_db::{
11 salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase, Upcast, 11 salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase, Upcast,
12}; 12};
13use stdx::format_to;
13 14
14use crate::{db::HirDatabase, expr::ExprValidator}; 15use crate::{db::HirDatabase, expr::ExprValidator};
15 16
@@ -131,7 +132,7 @@ impl TestDB {
131 for f in fns { 132 for f in fns {
132 let infer = self.infer(f.into()); 133 let infer = self.infer(f.into());
133 let mut sink = DiagnosticSink::new(|d| { 134 let mut sink = DiagnosticSink::new(|d| {
134 buf += &format!("{:?}: {}\n", d.syntax_node(self).text(), d.message()); 135 format_to!(buf, "{:?}: {}\n", d.syntax_node(self).text(), d.message());
135 }); 136 });
136 infer.add_diagnostics(self, f, &mut sink); 137 infer.add_diagnostics(self, f, &mut sink);
137 let mut validator = ExprValidator::new(f, infer, &mut sink); 138 let mut validator = ExprValidator::new(f, infer, &mut sink);