1
Fork 0

Rollup merge of #111580 - atsuzaki:layout-ice, r=oli-obk

Don't ICE on layout computation failure

Fixes #111176 regression.

r? `@oli-obk`
This commit is contained in:
Matthias Krüger 2023-08-29 20:49:02 +02:00 committed by GitHub
commit 56d7d93a4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 68 additions and 4 deletions

View file

@ -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 {