diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-01 12:40:47 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-01 12:40:47 +0100 |
commit | 248b656c2178a69955c56a48eb44b3cd59b634bb (patch) | |
tree | 3dd06d0f68a2ce856097fd064fbd9354ebedb645 /crates/ra_ide_db | |
parent | f372b13a858a6d037e38ab13ec7ae0286be5a001 (diff) | |
parent | d89827f9e01d855e9116a0d5276ffe1dad34ed3b (diff) |
Merge #5162
5162: Try to reduce Semantics monomorphisations r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <[email protected]>
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) |