aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-10-20 17:22:31 +0100
committerJonas Schievink <[email protected]>2020-10-20 17:22:31 +0100
commit4cb3cf352f5496161bf3cfad92ca87dd92d51d37 (patch)
treec30f260060c59c559e24a1eb8595c46cd11ef7d1
parent80d27414016903fa591548cff22939d3c43cdd8d (diff)
Rename UnconfiguredCode -> InactiveCode
-rw-r--r--crates/hir/src/diagnostics.rs2
-rw-r--r--crates/hir_def/src/diagnostics.rs6
-rw-r--r--crates/hir_def/src/nameres.rs2
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 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2pub use hir_def::diagnostics::{UnconfiguredCode, UnresolvedModule}; 2pub use hir_def::diagnostics::{InactiveCode, UnresolvedModule};
3pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder}; 3pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder};
4pub use hir_ty::diagnostics::{ 4pub use hir_ty::diagnostics::{
5 IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr, 5 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 {
91// 91//
92// This diagnostic is shown for code with inactive `#[cfg]` attributes. 92// This diagnostic is shown for code with inactive `#[cfg]` attributes.
93#[derive(Debug)] 93#[derive(Debug)]
94pub struct UnconfiguredCode { 94pub struct InactiveCode {
95 pub file: HirFileId, 95 pub file: HirFileId,
96 pub node: SyntaxNodePtr, 96 pub node: SyntaxNodePtr,
97} 97}
98 98
99impl Diagnostic for UnconfiguredCode { 99impl Diagnostic for InactiveCode {
100 fn code(&self) -> DiagnosticCode { 100 fn code(&self) -> DiagnosticCode {
101 DiagnosticCode("unconfigured-code") 101 DiagnosticCode("inactive-code")
102 } 102 }
103 fn message(&self) -> String { 103 fn message(&self) -> String {
104 // FIXME: say *why* it is configured out 104 // 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 {
396 } 396 }
397 397
398 DiagnosticKind::UnconfiguredCode { ast } => { 398 DiagnosticKind::UnconfiguredCode { ast } => {
399 sink.push(UnconfiguredCode { file: ast.file_id, node: ast.value.clone() }); 399 sink.push(InactiveCode { file: ast.file_id, node: ast.value.clone() });
400 } 400 }
401 } 401 }
402 } 402 }