Rename UnconfiguredCode -> InactiveCode
This commit is contained in:
parent
80d2741401
commit
4cb3cf352f
3 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
//! FIXME: write short doc here
|
//! 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_expand::diagnostics::{Diagnostic, DiagnosticSink, DiagnosticSinkBuilder};
|
||||||
pub use hir_ty::diagnostics::{
|
pub use hir_ty::diagnostics::{
|
||||||
IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr,
|
IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkInTailExpr,
|
||||||
|
|
|
@ -91,14 +91,14 @@ impl Diagnostic for UnresolvedImport {
|
||||||
//
|
//
|
||||||
// This diagnostic is shown for code with inactive `#[cfg]` attributes.
|
// This diagnostic is shown for code with inactive `#[cfg]` attributes.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct UnconfiguredCode {
|
pub struct InactiveCode {
|
||||||
pub file: HirFileId,
|
pub file: HirFileId,
|
||||||
pub node: SyntaxNodePtr,
|
pub node: SyntaxNodePtr,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Diagnostic for UnconfiguredCode {
|
impl Diagnostic for InactiveCode {
|
||||||
fn code(&self) -> DiagnosticCode {
|
fn code(&self) -> DiagnosticCode {
|
||||||
DiagnosticCode("unconfigured-code")
|
DiagnosticCode("inactive-code")
|
||||||
}
|
}
|
||||||
fn message(&self) -> String {
|
fn message(&self) -> String {
|
||||||
// FIXME: say *why* it is configured out
|
// FIXME: say *why* it is configured out
|
||||||
|
|
|
@ -396,7 +396,7 @@ mod diagnostics {
|
||||||
}
|
}
|
||||||
|
|
||||||
DiagnosticKind::UnconfiguredCode { ast } => {
|
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() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue