Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests.rs')
-rw-r--r--crates/hir-ty/src/tests.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir-ty/src/tests.rs b/crates/hir-ty/src/tests.rs
index 2a46becbfd..e67124d57a 100644
--- a/crates/hir-ty/src/tests.rs
+++ b/crates/hir-ty/src/tests.rs
@@ -12,7 +12,7 @@ mod traits;
use std::env;
-use base_db::{FileRange, SourceDatabaseExt2 as _};
+use base_db::SourceDatabaseExt2 as _;
use expect_test::Expect;
use hir_def::{
body::{Body, BodySourceMap, SyntheticSyntax},
@@ -23,7 +23,7 @@ use hir_def::{
src::HasSource,
AssocItemId, DefWithBodyId, HasModule, LocalModuleId, Lookup, ModuleDefId,
};
-use hir_expand::{db::ExpandDatabase, InFile};
+use hir_expand::{db::ExpandDatabase, FileRange, InFile};
use once_cell::race::OnceBool;
use rustc_hash::FxHashMap;
use stdx::format_to;
@@ -344,7 +344,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
} else {
(node.value.text_range(), node.value.text().to_string().replace('\n', " "))
};
- let macro_prefix = if node.file_id != file_id.into() { "!" } else { "" };
+ let macro_prefix = if node.file_id != file_id { "!" } else { "" };
format_to!(
buf,
"{}{:?} '{}': {}\n",
@@ -361,7 +361,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
});
for (src_ptr, mismatch) in &mismatches {
let range = src_ptr.value.text_range();
- let macro_prefix = if src_ptr.file_id != file_id.into() { "!" } else { "" };
+ let macro_prefix = if src_ptr.file_id != file_id { "!" } else { "" };
format_to!(
buf,
"{}{:?}: expected {}, got {}\n",
@@ -584,7 +584,7 @@ fn salsa_bug() {
}
";
- db.set_file_text(pos.file_id, new_text);
+ db.set_file_text(pos.file_id.file_id(), new_text);
let module = db.module_for_file(pos.file_id);
let crate_def_map = module.def_map(&db);