aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/Cargo.toml2
-rw-r--r--crates/ra_hir_ty/src/test_db.rs3
2 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml
index 9962112db..5a58d70cf 100644
--- a/crates/ra_hir_ty/Cargo.toml
+++ b/crates/ra_hir_ty/Cargo.toml
@@ -13,6 +13,8 @@ ena = "0.13.1"
13log = "0.4.8" 13log = "0.4.8"
14rustc-hash = "1.1.0" 14rustc-hash = "1.1.0"
15 15
16stdx = { path = "../stdx" }
17
16hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } 18hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
17hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 19hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
18ra_arena = { path = "../ra_arena" } 20ra_arena = { path = "../ra_arena" }
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);