diff options
author | Jonas Schievink <[email protected]> | 2020-10-20 17:22:31 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-10-20 17:22:31 +0100 |
commit | 4cb3cf352f5496161bf3cfad92ca87dd92d51d37 (patch) | |
tree | c30f260060c59c559e24a1eb8595c46cd11ef7d1 | |
parent | 80d27414016903fa591548cff22939d3c43cdd8d (diff) |
Rename UnconfiguredCode -> InactiveCode
-rw-r--r-- | crates/hir/src/diagnostics.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/diagnostics.rs | 6 | ||||
-rw-r--r-- | 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 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | pub use hir_def::diagnostics::{UnconfiguredCode, UnresolvedModule}; | 2 | pub use hir_def::diagnostics::{InactiveCode, UnresolvedModule}; |
3 | pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder}; | 3 | pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder}; |
4 | pub use hir_ty::diagnostics::{ | 4 | pub 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)] |
94 | pub struct UnconfiguredCode { | 94 | pub struct InactiveCode { |
95 | pub file: HirFileId, | 95 | pub file: HirFileId, |
96 | pub node: SyntaxNodePtr, | 96 | pub node: SyntaxNodePtr, |
97 | } | 97 | } |
98 | 98 | ||
99 | impl Diagnostic for UnconfiguredCode { | 99 | impl 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 | } |