about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve/search_graph
AgeCommit message (Collapse)AuthorLines
2023-10-10reorder files in solvelcnr-368/+0
2023-09-29Auto merge of #115843 - lcnr:bb-provisional-cache, r=compiler-errorsbors-186/+64
new solver: remove provisional cache The provisional cache is a performance optimization if there are large, interleaving cycles. Such cycles generally do not exist. It is incredibly complex and unsound in all trait solvers which have one: the old solver, chalk, and the new solver ([link](https://github.com/rust-lang/rust/blob/master/tests/ui/traits/new-solver/cycles/inductive-not-on-stack.rs)). Given the assumption that it is not perf-critical and also incredibly complex, remove it from the new solver, only checking whether a goal is on the stack. While writing this, I uncovered two additional soundness bugs, see the inline comments for them. r? `@compiler-errors`
2023-09-21Move `DepKind` to `rustc_query_system` and define it as `u16`John Kåre Alsaker-2/+2
2023-09-18remove provisional cachelcnr-186/+64
2023-09-14differentiate root and nested goalslcnr-3/+3
2023-09-11dedup `GoalEvaluationStep` and `GoalCandidate`lcnr-2/+9
also handle 2 panics when dumping proof trees for the whole test suite - need to actually tell the proof tree builder about overflow - need to handle a recursion_limit of 0 :<
2023-09-11split GoalEvaluation and CanonicalGoalEvaluationlcnr-0/+1
the unnormalized goal is in the callers inference context, while anything inside of the `CanonicalGoalEvaluation` is inside of a new one.
2023-08-30clean up `local_overflow_limit` computationRémy Rakic-5/+1
fixes bors snafu where it merged an outdated commit and missed this change
2023-08-29handle edge-case of a recursion limit of 0Rémy Rakic-1/+5
2023-08-12lower `evaluate_goal` stability check to `warn`lcnr-3/+7
2023-08-10make the provisional cache slightly less brokenlcnr-40/+57
2023-08-03inline helper methods into `with_new_goal`lcnr-115/+80
2023-08-03rewrite stack dependent overflow handlinglcnr-173/+178
2023-08-03handle overflow in the `EvalCtxt` separatelylcnr-28/+7
2023-08-03fix `make_ambiguous_response_no_constraints`lcnr-4/+12
we previously had incorrect universes in the query response.
2023-07-28refactor builtin unsize handling, extend commentslcnr-10/+4
2023-07-21new solver: add a separate cache for coherencelcnr-13/+12
2023-07-04reviewsBoxy-4/+1
2023-07-03add flag for disabling global cache and printing proof trees on errorBoxy-1/+4
2023-06-19dont use a traitBoxy-4/+4
2023-06-19say what kind of cache hitBoxy-3/+7
2023-06-19initial info dumpBoxy-2/+5
2023-05-25Prepopulate opaques in canonical inputMichael Goulet-30/+30
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-2/+2
2023-04-10Fix typos in compilerDaniPopes-2/+2
2023-04-05Tweak debug outputs to make debugging new solver easierMichael Goulet-0/+1
2023-03-29Rollup merge of #109718 - scottmcm:indexvec-last, r=NilstriebDylan DPC-1/+1
Rename `IndexVec::last` → `last_index` As I've been trying to replace a `Vec` with an `IndexVec`, having `last` exist on both but returning very different types makes the transition a bit awkward -- the errors are later, where you get things like "there's no `ty` method on `mir::Field`" rather than a more localized error like "hey, there's no `last` on `IndexVec`". So I propose renaming `last` to `last_index` to help distinguish `Vec::last`, which returns an element, and `IndexVec::last_index`, which returns an index. (Similarly, `Iterator::last` also returns an element, not an index.)
2023-03-29Rollup merge of #109683 - compiler-errors:self-ty-overflow, r=lcnrDylan DPC-0/+21
Check for overflow in `assemble_candidates_after_normalizing_self_ty` Prevents a stack overflow (:warning: :exclamation:) in the new solver when we have param-env candidates that look like: `T: Trait<Assoc = <T as Trait>::Assoc>` The current error message looks bad, but that's because we don't distinguish overflow and other ambiguity errors. I'll break that out into a separate PR since the fix may be controversial. r? `@lcnr`
2023-03-29Rename `IndexVec::last` → `last_index`Scott McMurray-1/+1
As I've been trying to replace a `Vec` with an `IndexVec`, having `last` exist on both but returning very different types makes the transition a bit awkward -- the errors are later, where you get things like "there's no `ty` method on `mir::Field`" rather than a more localized error like "hey, there's no `last` on `IndexVec`". So I propose renaming `last` to `last_index` to help distinguish `Vec::last`, which returns an element, and `IndexVec::last_index`, which returns an index. (Similarly, `Iterator::last` also returns an element, not an index.)
2023-03-28check for intercrate mode when accessing the cachelcnr-5/+22
2023-03-28Check for overflow in assemble_candidates_after_normalizing_self_tyMichael Goulet-0/+21
2023-03-25Remove some stale FIXMEs in new solverMichael Goulet-2/+0
2023-03-21disable global caching during coherencelcnr-1/+2
2023-03-21new solver cleanup + coherencelcnr-2/+11
2023-03-16replace usage of `evaluate_goal` with a new `add_goal`Boxy-3/+1
2023-03-10Actually cache goalsMichael Goulet-70/+60
2023-03-10Move some solver stuff to middleMichael Goulet-3/+4
2023-02-14Auto merge of #108056 - matthiaskrgr:rollup-oa6bxvh, r=matthiaskrgrbors-0/+18
Rollup of 9 pull requests Successful merges: - #107573 (Update the minimum external LLVM to 14) - #107626 (Fix `x fix` on the standard library itself) - #107673 (update ICU4X to 1.1.0) - #107733 (Store metrics from `metrics.json` to CI PGO timer) - #108007 (Use `is_str` instead of string kind comparison) - #108033 (add an unstable `#[rustc_coinductive]` attribute) - #108039 (Refactor refcounted structural_impls via functors) - #108040 (Use derive attributes for uninteresting traversals) - #108044 (interpret: rename Pointer::from_addr → from_addr_invalid) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-14Reduce visibility of some itemsSantiago Pastorino-8/+8
2023-02-14Check for overflow in evaluate_canonical_goalSantiago Pastorino-7/+40
2023-02-14add test for coinduction in new solverlcnr-0/+18
2023-02-13Implement repeat_while_none for both SearchGraph and EvalCtxtSantiago Pastorino-24/+37
2023-02-13Extract try_move_finished_goal_to_global_cache from try_finalize_goalSantiago Pastorino-23/+34
2023-02-13Make Ok value of repeat_while_none more generalSantiago Pastorino-4/+5
2023-02-08correctly update goals in the cachelcnr-5/+8
2023-02-03intern external constraintsMichael Goulet-2/+1
2023-01-31Rollup merge of #107348 - lcnr:project-solve-new, r=compiler-errorsGuillaume Gomez-1/+5
small refactor to new projection code extract `eq_term_and_make_canonical_response` into a helper function which also is another guarantee that the expected term does not influence candidate selection for projections. also change `evaluate_all(vec![single_goal])` to use `evaluate_goal`. the second commit now also adds a `debug_assert!` to `evaluate_goal`.
2023-01-27assert that solver results are stablelcnr-1/+5
2023-01-26Intern CanonicalVarValuesMichael Goulet-0/+1
2023-01-18add note about indirect cycleslcnr-0/+4