clean up layout error diagnostics

- group the fluent slugs together
- reword (internal-only) "too generic" error to be more in line with
  the other errors
This commit is contained in:
Lukas Markeffsky
2025-02-16 20:26:07 +01:00
parent d0a5bbbb8e
commit 802b7abab7
5 changed files with 27 additions and 27 deletions

View File

@@ -132,19 +132,19 @@ impl fmt::Debug for CustomSubdiagnostic<'_> {
#[derive(Diagnostic)]
pub enum LayoutError<'tcx> {
#[diag(middle_unknown_layout)]
#[diag(middle_layout_unknown)]
Unknown { ty: Ty<'tcx> },
#[diag(middle_too_generic)]
#[diag(middle_layout_too_generic)]
TooGeneric { ty: Ty<'tcx> },
#[diag(middle_values_too_big)]
#[diag(middle_layout_size_overflow)]
Overflow { ty: Ty<'tcx> },
#[diag(middle_cannot_be_normalized)]
#[diag(middle_layout_normalization_failure)]
NormalizationFailure { ty: Ty<'tcx>, failure_ty: String },
#[diag(middle_cycle)]
#[diag(middle_layout_cycle)]
Cycle,
#[diag(middle_layout_references_error)]