mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 10:58:02 +00:00
Switch to home-made db attaching infrastructure
Instead of using Salsa's, as we can no longer can a `dyn HirDatabase` from the `dyn salsa::Database` Salsa provides.
This commit is contained in:
parent
a7234f8b3a
commit
c6ef51e550
52 changed files with 499 additions and 418 deletions
|
|
@ -1,7 +1,6 @@
|
|||
//! Module responsible for analyzing the code surrounding the cursor for completion.
|
||||
use std::iter;
|
||||
|
||||
use base_db::salsa;
|
||||
use hir::{ExpandResult, InFile, Semantics, Type, TypeInfo, Variant};
|
||||
use ide_db::{RootDatabase, active_parameter::ActiveParameter};
|
||||
use itertools::Either;
|
||||
|
|
@ -86,7 +85,7 @@ pub(super) fn expand_and_analyze<'db>(
|
|||
let original_offset = expansion.original_offset + relative_offset;
|
||||
let token = expansion.original_file.token_at_offset(original_offset).left_biased()?;
|
||||
|
||||
salsa::attach(sema.db, || analyze(sema, expansion, original_token, &token)).map(
|
||||
hir::attach_db(sema.db, || analyze(sema, expansion, original_token, &token)).map(
|
||||
|(analysis, expected, qualifier_ctx)| AnalysisResult {
|
||||
analysis,
|
||||
expected,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue