aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-06-23 19:20:30 +0100
committerJonas Schievink <[email protected]>2020-06-24 15:53:56 +0100
commit16fd4dabb754b017237127e70ef1e2b409c4f9b6 (patch)
tree2743ebecc714b27f75a9dfe0a488437e475010ba /crates/ra_hir_ty
parentc019002d17185f4e8be54a978ab5d67bc632f518 (diff)
Remove file id from item tree
It's not needed, and `source` is only used by tests anyways
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs
index e82f2c11e..85ff26a36 100644
--- a/crates/ra_hir_ty/src/tests.rs
+++ b/crates/ra_hir_ty/src/tests.rs
@@ -166,17 +166,17 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
166 DefWithBodyId::FunctionId(it) => { 166 DefWithBodyId::FunctionId(it) => {
167 let loc = it.lookup(&db); 167 let loc = it.lookup(&db);
168 let tree = db.item_tree(loc.id.file_id); 168 let tree = db.item_tree(loc.id.file_id);
169 tree.source(&db, loc.id.value).syntax().text_range().start() 169 tree.source(&db, loc.id).syntax().text_range().start()
170 } 170 }
171 DefWithBodyId::ConstId(it) => { 171 DefWithBodyId::ConstId(it) => {
172 let loc = it.lookup(&db); 172 let loc = it.lookup(&db);
173 let tree = db.item_tree(loc.id.file_id); 173 let tree = db.item_tree(loc.id.file_id);
174 tree.source(&db, loc.id.value).syntax().text_range().start() 174 tree.source(&db, loc.id).syntax().text_range().start()
175 } 175 }
176 DefWithBodyId::StaticId(it) => { 176 DefWithBodyId::StaticId(it) => {
177 let loc = it.lookup(&db); 177 let loc = it.lookup(&db);
178 let tree = db.item_tree(loc.id.file_id); 178 let tree = db.item_tree(loc.id.file_id);
179 tree.source(&db, loc.id.value).syntax().text_range().start() 179 tree.source(&db, loc.id).syntax().text_range().start()
180 } 180 }
181 }); 181 });
182 for def in defs { 182 for def in defs {