1
Fork 0

add note for layout_of when query depth overflows

This commit is contained in:
SparrowLii 2022-09-14 21:00:00 +08:00
parent c3f59295fe
commit 44506f38e0
5 changed files with 52 additions and 5 deletions

View file

@ -77,4 +77,16 @@ pub struct IncrementCompilation {
#[derive(SessionDiagnostic)]
#[diag(query_system::query_overflow)]
pub struct QueryOverflow;
pub struct QueryOverflow {
#[subdiagnostic]
pub layout_of_depth: Option<LayoutOfDepth>,
}
#[derive(SessionSubdiagnostic)]
#[note(query_system::layout_of_depth)]
pub struct LayoutOfDepth {
#[primary_span]
pub span: Span,
pub desc: String,
pub depth: usize,
}