Skip to content

Commit 8a59af3

Browse files
Jonas Schievinkbnjjj
authored andcommitted
Rename UnconfiguredCode -> InactiveCode
1 parent 138d1a9 commit 8a59af3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/hir/src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! FIXME: write short doc here
2-
pub use hir_def::diagnostics::{UnconfiguredCode, UnresolvedModule};
2+
pub use hir_def::diagnostics::{InactiveCode, UnresolvedModule};
33
pub use hir_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder};
44
pub use hir_ty::diagnostics::{
55
IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr,

crates/hir_def/src/diagnostics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ impl Diagnostic for UnresolvedImport {
9191
//
9292
// This diagnostic is shown for code with inactive `#[cfg]` attributes.
9393
#[derive(Debug)]
94-
pub struct UnconfiguredCode {
94+
pub struct InactiveCode {
9595
pub file: HirFileId,
9696
pub node: SyntaxNodePtr,
9797
}
9898

99-
impl Diagnostic for UnconfiguredCode {
99+
impl Diagnostic for InactiveCode {
100100
fn code(&self) -> DiagnosticCode {
101-
DiagnosticCode("unconfigured-code")
101+
DiagnosticCode("inactive-code")
102102
}
103103
fn message(&self) -> String {
104104
// FIXME: say *why* it is configured out

crates/hir_def/src/nameres.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ mod diagnostics {
396396
}
397397

398398
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() });
400400
}
401401
}
402402
}

0 commit comments

Comments
 (0)