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;
ErrorHandled::Reported => {}
ErrorHandled::TooGeneric => bug!(
"MIR interpretation failed without reporting an error \
- even though it was fully monomorphized"
+ even though it was fully monomorphized"
),
}
}
) -> 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),
.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,