From 4cb3cf352f5496161bf3cfad92ca87dd92d51d37 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 20 Oct 2020 18:22:31 +0200 Subject: Rename UnconfiguredCode -> InactiveCode --- crates/hir_def/src/diagnostics.rs | 6 +++--- crates/hir_def/src/nameres.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/hir_def/src') diff --git a/crates/hir_def/src/diagnostics.rs b/crates/hir_def/src/diagnostics.rs index 53cf1aca1..ad3b6bf26 100644 --- a/crates/hir_def/src/diagnostics.rs +++ b/crates/hir_def/src/diagnostics.rs @@ -91,14 +91,14 @@ impl Diagnostic for UnresolvedImport { // // This diagnostic is shown for code with inactive `#[cfg]` attributes. #[derive(Debug)] -pub struct UnconfiguredCode { +pub struct InactiveCode { pub file: HirFileId, pub node: SyntaxNodePtr, } -impl Diagnostic for UnconfiguredCode { +impl Diagnostic for InactiveCode { fn code(&self) -> DiagnosticCode { - DiagnosticCode("unconfigured-code") + DiagnosticCode("inactive-code") } fn message(&self) -> String { // FIXME: say *why* it is configured out diff --git a/crates/hir_def/src/nameres.rs b/crates/hir_def/src/nameres.rs index 8bb3a659f..01a28aeeb 100644 --- a/crates/hir_def/src/nameres.rs +++ b/crates/hir_def/src/nameres.rs @@ -396,7 +396,7 @@ mod diagnostics { } DiagnosticKind::UnconfiguredCode { ast } => { - sink.push(UnconfiguredCode { file: ast.file_id, node: ast.value.clone() }); + sink.push(InactiveCode { file: ast.file_id, node: ast.value.clone() }); } } } -- cgit v1.2.3