]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/structured_errors.rs
Add some type-alias-impl-trait regression tests
[rust.git] / src / librustc_typeck / structured_errors.rs
index c8e5a635c15cb6bebf93790c6757491713378348..99b7b2001a9e9a29812a2ecf8ec6d3ec7da509c2 100644 (file)
@@ -1,9 +1,7 @@
-use errors::{Applicability, DiagnosticBuilder, DiagnosticId};
 use rustc::session::Session;
 use rustc::ty::{Ty, TypeFoldable};
-use syntax_pos::Span;
-
-use rustc_error_codes::*;
+use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticId};
+use rustc_span::Span;
 
 pub trait StructuredDiagnostic<'tcx> {
     fn session(&self) -> &Session;
@@ -50,8 +48,7 @@ fn session(&self) -> &Session {
     }
 
     fn code(&self) -> DiagnosticId {
-        syntax::diagnostic_used!(E0617);
-        DiagnosticId::Error("E0617".to_owned())
+        rustc_errors::error_code!(E0617)
     }
 
     fn common(&self) -> DiagnosticBuilder<'tcx> {
@@ -112,8 +109,7 @@ fn session(&self) -> &Session {
     }
 
     fn code(&self) -> DiagnosticId {
-        syntax::diagnostic_used!(E0607);
-        DiagnosticId::Error("E0607".to_owned())
+        rustc_errors::error_code!(E0607)
     }
 
     fn common(&self) -> DiagnosticBuilder<'tcx> {