Align diagnostics config with the rest of rust-analyzer

This commit is contained in:
Aleksey Kladov
2020-08-18 16:03:15 +02:00
parent b8dfc331ab
commit 0866b1be89
10 changed files with 93 additions and 98 deletions

View File

@@ -8,7 +8,7 @@ use rustc_hash::FxHashSet;
use base_db::SourceDatabaseExt;
use hir::Crate;
use ide::Severity;
use ide::{DiagnosticsConfig, Severity};
use crate::cli::{load_cargo::load_cargo, Result};
@@ -47,7 +47,8 @@ pub fn diagnostics(
String::from("unknown")
};
println!("processing crate: {}, module: {}", crate_name, _vfs.file_path(file_id));
for diagnostic in analysis.diagnostics(file_id, true, None).unwrap() {
for diagnostic in analysis.diagnostics(&DiagnosticsConfig::default(), file_id).unwrap()
{
if matches!(diagnostic.severity, Severity::Error) {
found_error = true;
}