aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db/src
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2020-07-01 10:43:36 +0100
committerLaurenČ›iu Nicola <[email protected]>2020-07-01 12:38:42 +0100
commite8505f14d4bb8d393ca77ec234dd1c99826a2d79 (patch)
tree21a8035b8e27cc1c66e66a69a3228e06160057bb /crates/ra_ide_db/src
parent99d6ef29a136069f6c99ec9f628108f151dec999 (diff)
Try to reduce Semantics monomorphisations
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r--crates/ra_ide_db/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ra_ide_db/src/lib.rs b/crates/ra_ide_db/src/lib.rs
index a808de4f1..c78071ad6 100644
--- a/crates/ra_ide_db/src/lib.rs
+++ b/crates/ra_ide_db/src/lib.rs
@@ -13,7 +13,7 @@ mod wasm_shims;
13 13
14use std::sync::Arc; 14use std::sync::Arc;
15 15
16use hir::db::{AstDatabase, DefDatabase}; 16use hir::db::{AstDatabase, DefDatabase, HirDatabase};
17use ra_db::{ 17use ra_db::{
18 salsa::{self, Database, Durability}, 18 salsa::{self, Database, Durability},
19 Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, 19 Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase,
@@ -52,6 +52,12 @@ impl Upcast<dyn DefDatabase> for RootDatabase {
52 } 52 }
53} 53}
54 54
55impl Upcast<dyn HirDatabase> for RootDatabase {
56 fn upcast(&self) -> &(dyn HirDatabase + 'static) {
57 &*self
58 }
59}
60
55impl FileLoader for RootDatabase { 61impl FileLoader for RootDatabase {
56 fn file_text(&self, file_id: FileId) -> Arc<String> { 62 fn file_text(&self, file_id: FileId) -> Arc<String> {
57 FileLoaderDelegate(self).file_text(file_id) 63 FileLoaderDelegate(self).file_text(file_id)