]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/mir/interpret/error.rs
fix rustfmt fallout
[rust.git] / src / librustc / mir / interpret / error.rs
index f54b9231d1acf1b816ccfef8794d526dc889220e..29b3b045ca5fe6ca173838da9c2007834d9cab79 100644 (file)
@@ -7,8 +7,8 @@
 use crate::ty::{self, layout, Ty};
 
 use backtrace::Backtrace;
-use errors::DiagnosticBuilder;
 use hir::GeneratorKind;
+use rustc_errors::{struct_span_err, DiagnosticBuilder};
 use rustc_hir as hir;
 use rustc_macros::HashStable;
 use rustc_span::symbol::Symbol;
@@ -33,7 +33,7 @@ pub fn assert_reported(self) {
             ErrorHandled::Reported => {}
             ErrorHandled::TooGeneric => bug!(
                 "MIR interpretation failed without reporting an error \
-                                              even though it was fully monomorphized"
+                 even though it was fully monomorphized"
             ),
         }
     }
@@ -137,7 +137,8 @@ fn struct_generic(
     ) -> Result<DiagnosticBuilder<'tcx>, ErrorHandled> {
         let must_error = match self.error {
             InterpError::MachineStop(_) => bug!("CTFE does not stop"),
-            err_inval!(Layout(LayoutError::Unknown(_))) | err_inval!(TooGeneric) => {
+            err_inval!(Layout(LayoutError::Unknown(_)))
+            | err_inval!(TooGeneric) => {
                 return Err(ErrorHandled::TooGeneric);
             }
             err_inval!(TypeckError) => return Err(ErrorHandled::Reported),
@@ -154,7 +155,7 @@ fn struct_generic(
                 .next()
                 .unwrap_or(lint_root);
             tcx.struct_span_lint_hir(
-                crate::rustc::lint::builtin::CONST_ERR,
+                rustc_session::lint::builtin::CONST_ERR,
                 hir_id,
                 tcx.span,
                 message,