diff options
| author | bors <bors@rust-lang.org> | 2022-08-25 21:27:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-25 21:27:38 +0000 |
| commit | cfb5ae26a4496b7d35180f15e47ada0f3897c7e8 (patch) | |
| tree | 3cc1936bac16b1090e75c50417549e2e459031e3 /compiler/rustc_serialize/src/lib.rs | |
| parent | 7480389611f9d04bd34adf41a2b3029be4eb815e (diff) | |
| parent | cbc6bd20191554421b3d4a377cd01169212da23b (diff) | |
| download | rust-cfb5ae26a4496b7d35180f15e47ada0f3897c7e8.tar.gz rust-cfb5ae26a4496b7d35180f15e47ada0f3897c7e8.zip | |
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.
Diffstat (limited to 'compiler/rustc_serialize/src/lib.rs')
0 files changed, 0 insertions, 0 deletions
