aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r--crates/hir/src/diagnostics.rs29
1 files changed, 1 insertions, 28 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index c294a803b..c2d608eb5 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -34,6 +34,7 @@ macro_rules! diagnostics {
34diagnostics![ 34diagnostics![
35 BreakOutsideOfLoop, 35 BreakOutsideOfLoop,
36 InactiveCode, 36 InactiveCode,
37 IncorrectCase,
37 MacroError, 38 MacroError,
38 MismatchedArgCount, 39 MismatchedArgCount,
39 MissingFields, 40 MissingFields,
@@ -195,31 +196,3 @@ impl Diagnostic for InternalBailedOut {
195} 196}
196 197
197pub use hir_ty::diagnostics::IncorrectCase; 198pub use hir_ty::diagnostics::IncorrectCase;
198
199impl Diagnostic for IncorrectCase {
200 fn code(&self) -> DiagnosticCode {
201 DiagnosticCode("incorrect-ident-case")
202 }
203
204 fn message(&self) -> String {
205 format!(
206 "{} `{}` should have {} name, e.g. `{}`",
207 self.ident_type,
208 self.ident_text,
209 self.expected_case.to_string(),
210 self.suggested_text
211 )
212 }
213
214 fn display_source(&self) -> InFile<SyntaxNodePtr> {
215 InFile::new(self.file, self.ident.clone().into())
216 }
217
218 fn as_any(&self) -> &(dyn Any + Send + 'static) {
219 self
220 }
221
222 fn is_experimental(&self) -> bool {
223 true
224 }
225}