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

@ -109,7 +109,7 @@ impl QueryContext for QueryCtxt<'_> {
// when accessing the `ImplicitCtxt`.
tls::with_related_context(**self, move |current_icx| {
if depth_limit && !self.recursion_limit().value_within_limit(current_icx.query_depth) {
self.depth_limit_error();
self.depth_limit_error(token);
}
// Update the `ImplicitCtxt` to point to our new query job.