From 16fd4dabb754b017237127e70ef1e2b409c4f9b6 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 23 Jun 2020 20:20:30 +0200 Subject: Remove file id from item tree It's not needed, and `source` is only used by tests anyways --- crates/ra_hir_ty/src/tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_ty/src') 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 { DefWithBodyId::FunctionId(it) => { let loc = it.lookup(&db); let tree = db.item_tree(loc.id.file_id); - tree.source(&db, loc.id.value).syntax().text_range().start() + tree.source(&db, loc.id).syntax().text_range().start() } DefWithBodyId::ConstId(it) => { let loc = it.lookup(&db); let tree = db.item_tree(loc.id.file_id); - tree.source(&db, loc.id.value).syntax().text_range().start() + tree.source(&db, loc.id).syntax().text_range().start() } DefWithBodyId::StaticId(it) => { let loc = it.lookup(&db); let tree = db.item_tree(loc.id.file_id); - tree.source(&db, loc.id.value).syntax().text_range().start() + tree.source(&db, loc.id).syntax().text_range().start() } }); for def in defs { -- cgit v1.2.3