Merge commit '37f84c101b' into sync-from-ra

This commit is contained in:
Laurențiu Nicola 2023-07-17 16:49:15 +03:00
parent 6502421771
commit 4704881b64
311 changed files with 13700 additions and 9110 deletions

View file

@ -60,6 +60,7 @@ mod interpret_function;
mod view_item_tree;
mod shuffle_crate_graph;
mod fetch_crates;
mod view_memory_layout;
use std::ffi::OsStr;
@ -74,6 +75,7 @@ use ide_db::{
};
use syntax::SourceFile;
use triomphe::Arc;
use view_memory_layout::{view_memory_layout, RecursiveMemoryLayout};
use crate::navigation_target::{ToNav, TryToNav};
@ -642,7 +644,7 @@ impl Analysis {
};
self.with_db(|db| {
let diagnostic_assists = if include_fixes {
let diagnostic_assists = if diagnostics_config.enabled && include_fixes {
ide_diagnostics::diagnostics(db, diagnostics_config, &resolve, frange.file_id)
.into_iter()
.flat_map(|it| it.fixes.unwrap_or_default())
@ -724,6 +726,13 @@ impl Analysis {
self.with_db(|db| move_item::move_item(db, range, direction))
}
pub fn get_recursive_memory_layout(
&self,
position: FilePosition,
) -> Cancellable<Option<RecursiveMemoryLayout>> {
self.with_db(|db| view_memory_layout(db, position))
}
/// Performs an operation on the database that may be canceled.
///
/// rust-analyzer needs to be able to answer semantic questions about the