mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
make HirDatabase object-safe
This commit is contained in:
parent
395965351d
commit
dbf9820e35
5 changed files with 26 additions and 16 deletions
|
@ -103,3 +103,8 @@ pub trait HirDatabase: PersistentHirDatabase {
|
|||
#[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
|
||||
fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hir_database_is_object_safe() {
|
||||
fn _assert_object_safe(_: &dyn HirDatabase) {}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{sync::Arc, panic};
|
|||
|
||||
use parking_lot::Mutex;
|
||||
use ra_db::{
|
||||
CheckCanceled, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, SourceDatabase, salsa,
|
||||
FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId, SourceDatabase, salsa,
|
||||
};
|
||||
use relative_path::RelativePathBuf;
|
||||
use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset};
|
||||
|
@ -159,8 +159,6 @@ impl salsa::ParallelDatabase for MockDatabase {
|
|||
}
|
||||
}
|
||||
|
||||
impl CheckCanceled for MockDatabase {}
|
||||
|
||||
impl AsRef<HirInterner> for MockDatabase {
|
||||
fn as_ref(&self) -> &HirInterner {
|
||||
&self.interner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue