rust/compiler
bors 371f3cd3fe Auto merge of #85868 - Aaron1011:projection-cache, r=jackh726
Preserve most sub-obligations in the projection cache

Fixes https://github.com/rust-lang/rust/issues/85360

When we evaluate a projection predicate, we may produce sub-obligations. During trait evaluation, evaluating these sub-obligations might cause us to produce `EvaluatedToOkModuloRegions`.

When we cache the result of projection in our projection cache, we try to throw away some of the sub-obligations, so that we don't need to re-evaluate/process them the next time we need to perform this particular projection. However, we may end up throwing away predicates that will (recursively) evaluate to `EvaluatedToOkModuloRegions`. If we do, then the result of evaluating a predicate will depend on the state of the predicate cache - this is global untracked state, which interacts badly with incremental compilation.

To fix this, we now only discard global predicates that evaluate to `EvaluatedToOk`. This ensures that any predicates that (may) evaluate to `EvaluatedToOkModuloRegions` are kept in the cache, and influence the results of any queries which perform this projection.
2021-09-02 21:26:59 +00:00
..
rustc
rustc_apfloat
rustc_arena Remove unused arena macro args 2021-08-30 13:09:38 +02:00
rustc_ast Handle let-else initializer edge case errors 2021-08-30 20:18:42 -05:00
rustc_ast_lowering Auto merge of #87114 - cjgillot:abilint, r=estebank 2021-09-02 06:06:24 +00:00
rustc_ast_passes Auto merge of #87114 - cjgillot:abilint, r=estebank 2021-09-02 06:06:24 +00:00
rustc_ast_pretty Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_attr
rustc_builtin_macros Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_codegen_cranelift Use in_incr_comp_dir_sess in cg_clif 2021-09-02 12:29:12 +02:00
rustc_codegen_llvm Rollup merge of #88350 - programmerjake:add-ppc-cr-xer-clobbers, r=Amanieu 2021-09-01 09:23:26 +02:00
rustc_codegen_ssa Auto merge of #88506 - Mark-Simulacrum:fix-rlibs, r=ehuss 2021-08-31 19:33:06 +00:00
rustc_data_structures Rollup merge of #88053 - bjorn3:fix_flock_fallback_impl, r=cjgillot 2021-09-01 09:23:25 +02:00
rustc_driver Remove print_fuel_crate field of Session 2021-09-02 12:29:11 +02:00
rustc_error_codes Update E0785.md 2021-08-30 22:18:55 -07:00
rustc_errors
rustc_expand Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_feature Add let_else feature gate 2021-08-30 20:18:39 -05:00
rustc_fs_util
rustc_graphviz
rustc_hir Rollup merge of #88486 - bjorn3:better_arena_macro, r=jackh726 2021-08-31 10:41:25 +02:00
rustc_hir_pretty Remove obsolete MacroDef variant of OwnerNode 2021-08-28 00:24:30 -07:00
rustc_incremental
rustc_index Suggested changes 2021-08-27 16:21:25 -07:00
rustc_infer Enforce diverging let...else 2021-08-30 20:18:42 -05:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #88512 - m-ou-se:array-into-iter-deref-stuff, r=estebank 2021-09-02 19:10:15 +02:00
rustc_lint_defs Tracking issue for UNSUPPORTED_CALLING_CONVENTIONS 2021-08-27 20:47:00 +03:00
rustc_llvm
rustc_macros
rustc_metadata Treat macros as HIR items 2021-08-28 00:16:34 -07:00
rustc_middle Rollup merge of #88532 - ptrojahn:single_use, r=davidtwco 2021-09-02 19:10:16 +02:00
rustc_mir Rollup merge of #88592 - b-naber:region_substs, r=oli-obk 2021-09-02 19:10:24 +02:00
rustc_mir_build Handle irrufutable or unreachable let-else 2021-08-30 20:18:43 -05:00
rustc_parse Auto merge of #87688 - camsteffen:let-else, r=cjgillot 2021-09-01 01:02:42 +00:00
rustc_parse_format
rustc_passes Rollup merge of #86376 - asquared31415:extern-no-mangle-84204, r=Mark-Simulacrum 2021-09-01 09:23:22 +02:00
rustc_plugin_impl
rustc_privacy rename const_evaluatable_checked to generic_const_exprs 2021-08-30 11:00:21 +02:00
rustc_query_impl Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebank 2021-09-01 03:43:37 +00:00
rustc_query_system Remove redundant Span in QueryJobInfo 2021-09-01 11:10:58 -07:00
rustc_resolve Auto merge of #88516 - matthiaskrgr:clippy_perf_end_august, r=jyn514,GuillaumeGomez 2021-09-02 10:27:44 +00:00
rustc_save_analysis Treat macros as HIR items 2021-08-28 00:16:34 -07:00
rustc_serialize
rustc_session Add explanation for ctfe_backtrace lock 2021-09-02 12:29:12 +02:00
rustc_span Rollup merge of #88350 - programmerjake:add-ppc-cr-xer-clobbers, r=Amanieu 2021-09-01 09:23:26 +02:00
rustc_symbol_mangling Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister 2021-08-29 16:25:28 +02:00
rustc_target Auto merge of #88516 - matthiaskrgr:clippy_perf_end_august, r=jyn514,GuillaumeGomez 2021-09-02 10:27:44 +00:00
rustc_trait_selection Report cycle error using 'deepest' obligation in the cycle 2021-09-02 11:49:32 -05:00
rustc_traits Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearth 2021-08-27 01:07:17 +00:00
rustc_ty_utils Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearth 2021-08-27 01:07:17 +00:00
rustc_type_ir
rustc_typeck Rollup merge of #88589 - xFrednet:00000-correct-comment-to-doc, r=petrochenkov 2021-09-02 19:10:23 +02:00