Rename UnconfiguredCode -> InactiveCode

This commit is contained in:
Jonas Schievink 2020-10-20 18:22:31 +02:00
parent 80d2741401
commit 4cb3cf352f
3 changed files with 5 additions and 5 deletions

View file

@ -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,

View file

@ -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

View file

@ -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() });
}
}
}