diff options
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/test_db.rs | 3 |
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" | |||
13 | log = "0.4.8" | 13 | log = "0.4.8" |
14 | rustc-hash = "1.1.0" | 14 | rustc-hash = "1.1.0" |
15 | 15 | ||
16 | stdx = { path = "../stdx" } | ||
17 | |||
16 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } | 18 | hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } |
17 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } | 19 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } |
18 | ra_arena = { path = "../ra_arena" } | 20 | ra_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}; | |||
10 | use ra_db::{ | 10 | use ra_db::{ |
11 | salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase, Upcast, | 11 | salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, SourceDatabase, Upcast, |
12 | }; | 12 | }; |
13 | use stdx::format_to; | ||
13 | 14 | ||
14 | use crate::{db::HirDatabase, expr::ExprValidator}; | 15 | use 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); |