mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 18:26:19 +00:00
Bump salsa
This commit is contained in:
parent
76ee900d7c
commit
cbff4ae151
10 changed files with 83 additions and 280 deletions
|
|
@ -395,21 +395,21 @@ impl BuiltDependency {
|
|||
pub type CratesIdMap = FxHashMap<CrateBuilderId, Crate>;
|
||||
|
||||
#[salsa_macros::input]
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialOrd, Ord)]
|
||||
pub struct Crate {
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
pub data: BuiltCrateData,
|
||||
/// Crate data that is not needed for analysis.
|
||||
///
|
||||
/// This is split into a separate field to increase incrementality.
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
pub extra_data: ExtraCrateData,
|
||||
// This is in `Arc` because it is shared for all crates in a workspace.
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
pub workspace_data: Arc<CrateWorkspaceData>,
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
pub cfg_options: CfgOptions,
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
pub env: Env,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ pub use vfs::{AnchoredPath, AnchoredPathBuf, FileId, VfsPath, file_set::FileSet}
|
|||
macro_rules! impl_intern_key {
|
||||
($id:ident, $loc:ident) => {
|
||||
#[salsa_macros::interned(no_lifetime)]
|
||||
#[derive(PartialOrd, Ord)]
|
||||
pub struct $id {
|
||||
pub loc: $loc,
|
||||
}
|
||||
|
|
@ -165,6 +166,7 @@ impl Files {
|
|||
}
|
||||
|
||||
#[salsa_macros::interned(no_lifetime, debug, constructor=from_span)]
|
||||
#[derive(PartialOrd, Ord)]
|
||||
pub struct EditionedFileId {
|
||||
pub editioned_file_id: span::EditionedFileId,
|
||||
}
|
||||
|
|
@ -356,7 +358,7 @@ fn parse(db: &dyn RootQueryDb, file_id: EditionedFileId) -> Parse<ast::SourceFil
|
|||
}
|
||||
|
||||
fn parse_errors(db: &dyn RootQueryDb, file_id: EditionedFileId) -> Option<&[SyntaxError]> {
|
||||
#[salsa_macros::tracked(return_ref)]
|
||||
#[salsa_macros::tracked(returns(ref))]
|
||||
fn parse_errors(db: &dyn RootQueryDb, file_id: EditionedFileId) -> Option<Box<[SyntaxError]>> {
|
||||
let errors = db.parse(file_id).errors();
|
||||
match &*errors {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue