rust/compiler
bors c018ae5389 Auto merge of #144991 - lcnr:ignore-usages-from-ignored-candidates, r=BoxyUwU
ignore head usages from ignored candidates

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/210. The test now takes 0.8s to compile, which seems good enough to me. We are actually still walking the entire graph here, we're just avoiding unnecessary reruns.

The basic idea is that if we've only accessed a cycle head inside of a candidate which didn't impact the final result of our goal, we don't need to rerun that cycle head even if is the used provisional result differs from the final result.

We also use this information when rebasing goals over their cycle heads. If a goal doesn't actually depend on the result of that cycle head, rebasing always succeeds. However, we still need to make sure we track the fact that we relied on the cycle head at all to avoid query instability.

It is implemented by tracking the number of `HeadUsages` for every head while evaluating goals. We then also track the head usages while evaluating a single candidate, which the search graph returns as `CandidateHeadUsages`. If there is now an always applicable candidate  candidate we know that all other candidates with that source did not matter. We then call `fn ignore_candidate_head_usages` to remove the usages while evaluating this single candidate from the total. If the final `HeadUsages` end up empty, we know that the result of this cycle head did not matter when evaluating its nested goals.
2025-08-15 12:35:09 +00:00
..
rustc rename stable_mir to rustc_public, and rustc_smir to rustc_public_bridge 2025-07-14 09:25:54 +00:00
rustc_abi Reuse sign_extend helper 2025-07-29 14:17:48 +00:00
rustc_arena Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
rustc_ast Extract ast TraitImplHeader 2025-08-11 17:05:36 -05:00
rustc_ast_ir Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_ast_lowering Pass the target type down to parse_attribute_list 2025-08-14 18:11:56 +02:00
rustc_ast_passes Rollup merge of #143075 - workingjubilee:interrupts-may-return-nevermore, r=davidtwco 2025-08-15 16:16:31 +10:00
rustc_ast_pretty Extract ast TraitImplHeader 2025-08-11 17:05:36 -05:00
rustc_attr_parsing Specify the list of allowed targets per attribute 2025-08-14 18:18:22 +02:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Adjust error message grammar to be less awkward 2025-08-14 12:50:07 -04:00
rustc_builtin_macros Rollup merge of #142640 - Sa4dUs:ad-intrinsic, r=ZuseZ4 2025-08-15 16:16:30 +10:00
rustc_codegen_cranelift Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
rustc_codegen_gcc Complete functionality and general cleanup 2025-08-14 16:30:15 +00:00
rustc_codegen_llvm Rollup merge of #145275 - StackOverflowExcept1on:fix-wasm32v1-none, r=alexcrichton 2025-08-15 16:16:38 +10:00
rustc_codegen_ssa Rollup merge of #145004 - bjorn3:remove_unused_fields, r=WaffleLapkin 2025-08-15 16:16:33 +10:00
rustc_const_eval Rollup merge of #145266 - camsteffen:reduce-queries, r=petrochenkov 2025-08-14 11:39:38 +02:00
rustc_data_structures Allow pretty printing paths with -Zself-profile-events=args 2025-07-25 22:24:21 +02:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_error_codes Rollup merge of #144944 - He1pa:E0793, r=compiler-errors 2025-08-15 16:16:32 +10:00
rustc_error_messages Remove unused feature gates 2025-06-28 23:36:46 +00:00
rustc_errors Rollup merge of #137872 - estebank:extra-vert, r=compiler-errors 2025-08-14 21:48:41 +02:00
rustc_expand Rollup merge of #145153 - joshtriplett:macro-kinds-plural, r=petrochenkov 2025-08-13 18:43:01 +02:00
rustc_feature Stabilize sse4a and tbm target features 2025-08-14 02:07:40 +05:30
rustc_fluent_macro Remove all unused feature gates from the compiler 2025-06-08 14:50:42 +00:00
rustc_fs_util Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Remove the old target checking logic 2025-08-14 18:18:42 +02:00
rustc_hir_analysis Rollup merge of #145235 - compiler-errors:comment, r=BoxyUwU 2025-08-15 16:16:38 +10:00
rustc_hir_pretty Propagate TraitImplHeader to hir 2025-08-11 17:05:42 -05:00
rustc_hir_typeck Rollup merge of #145235 - compiler-errors:comment, r=BoxyUwU 2025-08-15 16:16:38 +10:00
rustc_incremental Auto merge of #139758 - Zoxc:thread-local-graph, r=oli-obk 2025-05-07 12:39:54 +00:00
rustc_index Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_index_macros Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_infer remove from_forall 2025-08-11 09:18:46 +02:00
rustc_interface Fix parallel rustc not being reproducible due to unstable sorting of items. 2025-08-13 08:59:32 +08:00
rustc_lexer test(lexer): Add frontmatter unit test 2025-07-10 10:25:29 -05:00
rustc_lint Rollup merge of #145266 - camsteffen:reduce-queries, r=petrochenkov 2025-08-14 11:39:38 +02:00
rustc_lint_defs Rollup merge of #144865 - WaffleLapkin:track-tail, r=lqd 2025-08-15 16:16:31 +10:00
rustc_llvm Auto merge of #145093 - nikic:dead-on-return, r=nnethercote 2025-08-13 04:18:43 +00:00
rustc_log Add documentation for init_logger_with_additional_layer 2025-06-12 12:11:15 +02:00
rustc_macros cleanup: Remove useless [T].iter().last() 2025-08-14 16:28:56 +00:00
rustc_metadata Switch to a bitflags MacroKinds to support macros with more than one kind 2025-08-12 09:24:45 -07:00
rustc_middle Auto merge of #145423 - Zalathar:rollup-9jtefpl, r=Zalathar 2025-08-15 09:13:10 +00:00
rustc_mir_build Auto merge of #145423 - Zalathar:rollup-9jtefpl, r=Zalathar 2025-08-15 09:13:10 +00:00
rustc_mir_dataflow Escape diff strings in graphviz 2025-08-08 00:20:55 -05:00
rustc_mir_transform Rollup merge of #145392 - Zalathar:create-mappings, r=petrochenkov 2025-08-15 16:16:43 +10:00
rustc_monomorphize Rollup merge of #144865 - WaffleLapkin:track-tail, r=lqd 2025-08-15 16:16:31 +10:00
rustc_next_trait_solver update comment 2025-08-14 16:07:24 +02:00
rustc_parse Rollup merge of #145378 - xizheyin:144968, r=davidtwco 2025-08-15 16:16:41 +10:00
rustc_parse_format update to literal-escaper-0.0.5 2025-07-08 10:16:44 +00:00
rustc_passes Remove the old target checking logic 2025-08-14 18:18:42 +02:00
rustc_pattern_analysis avoid unnecessary type sanity checks 2025-08-14 09:44:22 +02:00
rustc_privacy Propagate TraitImplHeader to hir 2025-08-11 17:05:42 -05:00
rustc_proc_macro Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_public fix missing parenthesis in pretty discriminant 2025-08-09 01:35:50 +08:00
rustc_public_bridge Remove useless lifetime parameter. 2025-07-23 23:54:37 +00:00
rustc_query_impl Remove unused allow attrs 2025-07-07 12:58:16 +00:00
rustc_query_system remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
rustc_resolve Rollup merge of #145369 - estebank:issue-145367, r=compiler-errors 2025-08-15 16:16:40 +10:00
rustc_sanitizers rename TraitRef::from_method to from_assoc 2025-08-09 14:22:01 +08:00
rustc_serialize use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
rustc_session Rollup merge of #145005 - tardyp:lto_big_filesize, r=bjorn3 2025-08-15 16:16:34 +10:00
rustc_span Basic implementation of autodiff intrinsic 2025-08-14 16:29:58 +00:00
rustc_symbol_mangling Rollup merge of #144949 - nnethercote:more-Printer-cleanups, r=davidtwco 2025-08-13 18:42:59 +02:00
rustc_target Rollup merge of #145004 - bjorn3:remove_unused_fields, r=WaffleLapkin 2025-08-15 16:16:33 +10:00
rustc_thread_pool Drop rust-version from rustc_thread_pool 2025-08-04 15:03:49 -07:00
rustc_trait_selection Rollup merge of #145235 - compiler-errors:comment, r=BoxyUwU 2025-08-15 16:16:38 +10:00
rustc_traits Auto merge of #144446 - nnethercote:opt-region-constraints, r=lcnr 2025-08-01 04:06:21 +00:00
rustc_transmute Tidy up Cargo.toml files. 2025-07-31 19:58:04 +10:00
rustc_ty_utils use ty::Value instead of manual pairs of types and valtrees 2025-08-14 09:44:22 +02:00
rustc_type_ir ignore head usages of ignored candidates 2025-08-14 14:38:00 +02:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00