aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r--crates/hir_def/src/diagnostics.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_def/src/diagnostics.rs b/crates/hir_def/src/diagnostics.rs
index 34a6a8d4b..532496b62 100644
--- a/crates/hir_def/src/diagnostics.rs
+++ b/crates/hir_def/src/diagnostics.rs
@@ -1,13 +1,12 @@
1//! Diagnostics produced by `hir_def`. 1//! Diagnostics produced by `hir_def`.
2 2
3use std::any::Any; 3use std::any::Any;
4use std::fmt::Write; 4use stdx::format_to;
5 5
6use cfg::{CfgExpr, CfgOptions, DnfExpr}; 6use cfg::{CfgExpr, CfgOptions, DnfExpr};
7use hir_expand::diagnostics::{Diagnostic, DiagnosticCode}; 7use hir_expand::diagnostics::{Diagnostic, DiagnosticCode};
8use syntax::{ast, AstPtr, SyntaxNodePtr};
9
10use hir_expand::{HirFileId, InFile}; 8use hir_expand::{HirFileId, InFile};
9use syntax::{ast, AstPtr, SyntaxNodePtr};
11 10
12// Diagnostic: unresolved-module 11// Diagnostic: unresolved-module
13// 12//
@@ -109,7 +108,7 @@ impl Diagnostic for InactiveCode {
109 let mut buf = "code is inactive due to #[cfg] directives".to_string(); 108 let mut buf = "code is inactive due to #[cfg] directives".to_string();
110 109
111 if let Some(inactive) = inactive { 110 if let Some(inactive) = inactive {
112 write!(buf, ": {}", inactive).unwrap(); 111 format_to!(buf, ": {}", inactive);
113 } 112 }
114 113
115 buf 114 buf