diff options
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r-- | crates/hir/src/diagnostics.rs | 23 |
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. |
6 | use std::any::Any; | ||
7 | |||
8 | use cfg::{CfgExpr, CfgOptions}; | 6 | use cfg::{CfgExpr, CfgOptions}; |
9 | use either::Either; | 7 | use either::Either; |
10 | use hir_def::path::ModPath; | 8 | use 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)] | ||
161 | pub struct InternalBailedOut { | ||
162 | pub file: HirFileId, | ||
163 | pub pat_syntax_ptr: SyntaxNodePtr, | ||
164 | } | ||
165 | |||
166 | impl 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 | |||
181 | pub use hir_ty::diagnostics::IncorrectCase; | 158 | pub use hir_ty::diagnostics::IncorrectCase; |