1
Fork 0
rust/compiler/rustc_middle/src
Dylan DPC d6f0c51e98
Rollup merge of #107585 - compiler-errors:fndef-sig-cycle, r=oli-obk
Don't cause a cycle when formatting query description that references a FnDef

When a function returns `-> _`, we use typeck to compute what the resulting type of the body _should_ be. If we call another query inside of typeck and hit a cycle error, we attempt to report the cycle error which requires us to compute all of the query descriptions for the stack.

However, if one of the queries in that cycle has a query description that references this function as a FnDef type, we'll cause a *second* cycle error from within the cycle error reporting code, since rendering a FnDef requires us to compute its signature. This causes an unwrap to ICE, since during the *second* cycle reporting code, we try to look for a job that isn't in the active jobs list.

We can avoid this by using `with_no_queries!` when computing these query descriptions.

Fixes #107089

The only drawback is that the rendering of opaque types in cycles regresses a bit :| I'm open to alternate suggestions about how we may handle this...
2023-02-03 23:04:52 +05:30
..
dep_graph rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
hir Improve pretty-printing of HirIdValidator errors 2023-02-01 20:09:22 +01:00
infer Make make_identity take CanonicalVarInfos 2023-01-26 20:33:40 +00:00
middle rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
mir Rollup merge of #107467 - WaffleLapkin:uneq, r=oli-obk 2023-01-31 23:38:52 +01:00
query Auto merge of #107463 - Dylan-DPC:rollup-6mq1li8, r=Dylan-DPC 2023-01-30 11:14:21 +00:00
thir address review 2023-01-27 22:13:55 +01:00
traits Impl HashStable/Encodable/Decodable for ObligationCause. 2023-01-27 18:56:32 +00:00
ty Rollup merge of #107585 - compiler-errors:fndef-sig-cycle, r=oli-obk 2023-02-03 23:04:52 +05:30
util Add some docs to bug, span_bug and delay_span_bug 2022-12-30 16:47:56 +01:00
arena.rs Remove HirId -> LocalDefId map from HIR. 2023-01-28 09:55:26 +00:00
error.rs Match crate and slug names 2022-11-21 15:24:50 +01:00
lib.rs Use strict provenance APIs in ty::tls 2023-01-21 11:25:21 +01:00
lint.rs create helper function for rustc_lint_defs::Level and remove it's duplicated code r=ozkanonur 2023-01-10 10:56:17 +03:00
macros.rs Stop using BREAK & CONTINUE in compiler 2023-01-17 23:17:51 -08:00
metadata.rs rustc: Parameterize ty::Visibility over used ID 2022-09-07 13:35:41 +04:00
tests.rs
thir.rs output tree representation for thir-tree 2023-01-26 11:31:55 +01:00
values.rs add EarlyBinder::subst_identity; impl ParameterizedOverTcx (needed for rustc_metadata) and Value for EarlyBinder 2023-01-14 00:13:06 -07:00