rust/compiler/rustc_macros/src
bors cfb5ae26a4 Auto merge of #100748 - SparrowLii:query_depth, r=cjgillot
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.
2022-08-25 21:27:38 +00:00
..
diagnostics Auto merge of #100675 - Xiretza:fluent-mandate-crate-prefix, r=davidtwco 2022-08-23 22:30:07 +00:00
symbols
hash_stable.rs
lib.rs Replace #[lint/warning/error] with #[diag] 2022-08-21 09:17:43 +02:00
lift.rs
newtype.rs
query.rs Auto merge of #100748 - SparrowLii:query_depth, r=cjgillot 2022-08-25 21:27:38 +00:00
serialize.rs
symbols.rs symbols: add is_preinterned fn to check if symbol was preinterned in compiler 2022-08-20 15:13:41 +03:00
type_foldable.rs Add #[derive(TypeVisitable)] 2022-07-05 22:25:15 +01:00
type_visitable.rs Add #[derive(TypeVisitable)] 2022-07-05 22:25:15 +01:00