aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/diagnostics.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-13 19:55:51 +0100
committerAleksey Kladov <[email protected]>2021-06-13 19:55:51 +0100
commit935c53b92eea7c288b781ecd68436c9733ec8a83 (patch)
tree379899e0c1b3027df86a028b24203b58dd2fc49b /crates/hir/src/diagnostics.rs
parentb292e1b9da39813e2739cb450c263e7502c97c8d (diff)
internal: use cov-mark rather than bailing out diagnostic
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r--crates/hir/src/diagnostics.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index 5cffef47f..1f6a70006 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -3,8 +3,6 @@
3//! 3//!
4//! This probably isn't the best way to do this -- ideally, diagnistics should 4//! This probably isn't the best way to do this -- ideally, diagnistics should
5//! be expressed in terms of hir types themselves. 5//! be expressed in terms of hir types themselves.
6use std::any::Any;
7
8use cfg::{CfgExpr, CfgOptions}; 6use cfg::{CfgExpr, CfgOptions};
9use either::Either; 7use either::Either;
10use hir_def::path::ModPath; 8use hir_def::path::ModPath;
@@ -157,25 +155,4 @@ pub struct MissingMatchArms {
157 pub arms: AstPtr<ast::MatchArmList>, 155 pub arms: AstPtr<ast::MatchArmList>,
158} 156}
159 157
160#[derive(Debug)]
161pub struct InternalBailedOut {
162 pub file: HirFileId,
163 pub pat_syntax_ptr: SyntaxNodePtr,
164}
165
166impl Diagnostic for InternalBailedOut {
167 fn code(&self) -> DiagnosticCode {
168 DiagnosticCode("internal:match-check-bailed-out")
169 }
170 fn message(&self) -> String {
171 format!("Internal: match check bailed out")
172 }
173 fn display_source(&self) -> InFile<SyntaxNodePtr> {
174 InFile { file_id: self.file, value: self.pat_syntax_ptr.clone() }
175 }
176 fn as_any(&self) -> &(dyn Any + Send + 'static) {
177 self
178 }
179}
180
181pub use hir_ty::diagnostics::IncorrectCase; 158pub use hir_ty::diagnostics::IncorrectCase;