mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Salsify the crate graph
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
This commit is contained in:
parent
44f18c3d05
commit
c94e9efbef
108 changed files with 3630 additions and 2512 deletions
|
|
@ -389,9 +389,9 @@ pub fn semantic_diagnostics(
|
|||
module.and_then(|m| db.toolchain_channel(m.krate().into())),
|
||||
Some(ReleaseChannel::Nightly) | None
|
||||
);
|
||||
let krate = module.map(|module| module.krate()).unwrap_or_else(|| {
|
||||
(*db.crate_graph().crates_in_topological_order().last().unwrap()).into()
|
||||
});
|
||||
let krate = module
|
||||
.map(|module| module.krate())
|
||||
.unwrap_or_else(|| (*db.all_crates().last().unwrap()).into());
|
||||
let display_target = krate.to_display_target(db);
|
||||
let ctx = DiagnosticsContext { config, sema, resolve, edition, is_nightly, display_target };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue