rustc_middle/query/stack.rs
1use rustc_span::Span;
2
3use crate::queries::TaggedQueryKey;
4
5/// Description of a frame in the query stack.
6///
7/// This is mostly used in case of cycles for error reporting.
8#[derive(Debug)]
9pub struct QueryStackFrame<'tcx> {
10 pub span: Span,
11
12 /// The query and key of the query method call that this stack frame
13 /// corresponds to.
14 ///
15 /// Code that doesn't care about the specific key can still use this to
16 /// check which query it's for, or obtain the query's name.
17 pub tagged_key: TaggedQueryKey<'tcx>,
18}