mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
switch interner to use arena
This commit is contained in:
parent
5603237c06
commit
d4c8310d05
6 changed files with 23 additions and 40 deletions
|
@ -18,23 +18,9 @@ pub use crate::{
|
|||
FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery,
|
||||
FileRelativePathQuery
|
||||
},
|
||||
loc2id::{LocationIntener, NumericId},
|
||||
loc2id::LocationIntener,
|
||||
};
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! impl_numeric_id {
|
||||
($id:ident) => {
|
||||
impl $crate::NumericId for $id {
|
||||
fn from_u32(id: u32) -> Self {
|
||||
$id(id)
|
||||
}
|
||||
fn to_u32(self) -> u32 {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
pub trait BaseDatabase: salsa::Database {
|
||||
fn check_canceled(&self) -> Cancelable<()> {
|
||||
if self.salsa_runtime().is_current_revision_canceled() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue