diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/db.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir/src/mock.rs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 6b21fe744..e03632519 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -103,3 +103,8 @@ pub trait HirDatabase: PersistentHirDatabase { | |||
103 | #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] | 103 | #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] |
104 | fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; | 104 | fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; |
105 | } | 105 | } |
106 | |||
107 | #[test] | ||
108 | fn hir_database_is_object_safe() { | ||
109 | fn _assert_object_safe(_: &dyn HirDatabase) {} | ||
110 | } | ||
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs index 17bdd48c6..00a07d1a1 100644 --- a/crates/ra_hir/src/mock.rs +++ b/crates/ra_hir/src/mock.rs | |||
@@ -2,7 +2,7 @@ use std::{sync::Arc, panic}; | |||
2 | 2 | ||
3 | use parking_lot::Mutex; | 3 | use parking_lot::Mutex; |
4 | use ra_db::{ | 4 | use ra_db::{ |
5 | CheckCanceled, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, SourceDatabase, salsa, | 5 | FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, SourceDatabase, salsa, |
6 | }; | 6 | }; |
7 | use relative_path::RelativePathBuf; | 7 | use relative_path::RelativePathBuf; |
8 | use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset}; | 8 | use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset}; |
@@ -159,8 +159,6 @@ impl salsa::ParallelDatabase for MockDatabase { | |||
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | ||
162 | impl CheckCanceled for MockDatabase {} | ||
163 | |||
164 | impl AsRef<HirInterner> for MockDatabase { | 162 | impl AsRef<HirInterner> for MockDatabase { |
165 | fn as_ref(&self) -> &HirInterner { | 163 | fn as_ref(&self) -> &HirInterner { |
166 | &self.interner | 164 | &self.interner |