improve diagnostics for const eval query overflow

This commit is contained in:
Martin Zacho
2025-01-06 09:04:22 +01:00
parent 83853ccdc3
commit 38e10e5619
7 changed files with 32 additions and 26 deletions

View File

@@ -84,14 +84,14 @@ pub struct QueryOverflow {
#[primary_span]
pub span: Option<Span>,
#[subdiagnostic]
pub layout_of_depth: Option<LayoutOfDepth>,
pub note: Option<QueryOverflowNote>,
pub suggested_limit: Limit,
pub crate_name: Symbol,
}
#[derive(Subdiagnostic)]
#[note(query_system_layout_of_depth)]
pub struct LayoutOfDepth {
#[note(query_system_overflow_note)]
pub struct QueryOverflowNote {
pub desc: String,
pub depth: usize,
}