diff options
author | Laurențiu Nicola <[email protected]> | 2020-07-01 10:43:36 +0100 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2020-07-01 12:38:42 +0100 |
commit | e8505f14d4bb8d393ca77ec234dd1c99826a2d79 (patch) | |
tree | 21a8035b8e27cc1c66e66a69a3228e06160057bb /crates/ra_ide_db | |
parent | 99d6ef29a136069f6c99ec9f628108f151dec999 (diff) |
Try to reduce Semantics monomorphisations
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r-- | crates/ra_ide_db/src/lib.rs | 8 |
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 | ||
14 | use std::sync::Arc; | 14 | use std::sync::Arc; |
15 | 15 | ||
16 | use hir::db::{AstDatabase, DefDatabase}; | 16 | use hir::db::{AstDatabase, DefDatabase, HirDatabase}; |
17 | use ra_db::{ | 17 | use 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 | ||
55 | impl Upcast<dyn HirDatabase> for RootDatabase { | ||
56 | fn upcast(&self) -> &(dyn HirDatabase + 'static) { | ||
57 | &*self | ||
58 | } | ||
59 | } | ||
60 | |||
55 | impl FileLoader for RootDatabase { | 61 | impl 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) |