Don't ICE on layout computation failure
This commit is contained in:
parent
4410868798
commit
56b767322b
8 changed files with 68 additions and 4 deletions
|
@ -7,6 +7,7 @@ use rustc_errors::{
|
|||
IntoDiagnosticArg,
|
||||
};
|
||||
use rustc_macros::Diagnostic;
|
||||
use rustc_middle::ty::layout::LayoutError;
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_span::{Span, Symbol};
|
||||
use rustc_type_ir::FloatTy;
|
||||
|
@ -1030,6 +1031,15 @@ pub struct TargetFeatureSafeTrait {
|
|||
pub def: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(codegen_ssa_failed_to_get_layout)]
|
||||
pub struct FailedToGetLayout<'tcx> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub ty: Ty<'tcx>,
|
||||
pub err: LayoutError<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(codegen_ssa_error_creating_remark_dir)]
|
||||
pub struct ErrorCreatingRemarkDir {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue