cfb5ae26a4
add `depth_limit` in `QueryVTable` to avoid entering a new tcx in `layout_of` Fixes #49735 Updates #48685 The `layout_of` query needs to check whether it overflows the depth limit, and the current implementation needs to create a new `ImplicitCtxt` inside `layout_of`. However, `start_query` will already create a new `ImplicitCtxt`, so we can check the depth limit in `start_query`. We can tell whether we need to check the depth limit simply by whether the return value of `to_debug_str` of the query is `layout_of`. But I think adding the `depth_limit` field in `QueryVTable` may be more elegant and more scalable. |
||
---|---|---|
.. | ||
keys.rs | ||
lib.rs | ||
on_disk_cache.rs | ||
plumbing.rs | ||
profiling_support.rs | ||
README.md | ||
values.rs |
For more information about how the query system works, see the rustc dev guide.