Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/lib.rs')
-rw-r--r--crates/ide-diagnostics/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/ide-diagnostics/src/lib.rs b/crates/ide-diagnostics/src/lib.rs
index 0b32144249..0c6953419f 100644
--- a/crates/ide-diagnostics/src/lib.rs
+++ b/crates/ide-diagnostics/src/lib.rs
@@ -100,6 +100,7 @@ use ide_db::{
generated::lints::{CLIPPY_LINT_GROUPS, DEFAULT_LINT_GROUPS, DEFAULT_LINTS, Lint, LintGroup},
imports::insert_use::InsertUseConfig,
label::Label,
+ rename::RenameConfig,
source_change::SourceChange,
};
use syntax::{
@@ -107,7 +108,6 @@ use syntax::{
ast::{self, AstNode},
};
-// FIXME: Make this an enum
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum DiagnosticCode {
RustcHardError(&'static str),
@@ -238,6 +238,7 @@ pub struct DiagnosticsConfig {
pub prefer_absolute: bool,
pub term_search_fuel: u64,
pub term_search_borrowck: bool,
+ pub show_rename_conflicts: bool,
}
impl DiagnosticsConfig {
@@ -266,8 +267,13 @@ impl DiagnosticsConfig {
prefer_absolute: false,
term_search_fuel: 400,
term_search_borrowck: true,
+ show_rename_conflicts: true,
}
}
+
+ pub fn rename_config(&self) -> RenameConfig {
+ RenameConfig { show_conflicts: self.show_rename_conflicts }
+ }
}
struct DiagnosticsContext<'a> {