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/src/diagnostics.rs | 2 +- crates/hir_def/src/diagnostics.rs | 6 +++--- crates/hir_def/src/nameres.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs index d476ca3b9..c18c1c587 100644 --- a/crates/hir/src/diagnostics.rs +++ b/crates/hir/src/diagnostics.rs @@ -1,5 +1,5 @@ //! FIXME: write short doc here -pub use hir_def::diagnostics::{UnconfiguredCode, UnresolvedModule}; +pub use hir_def::diagnostics::{InactiveCode, UnresolvedModule}; pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder}; pub use hir_ty::diagnostics::{ IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr, 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