Commit Graph

20 Commits

Author SHA1 Message Date
Dylan DPC
14157561fb Rollup merge of #109718 - scottmcm:indexvec-last, r=Nilstrieb
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-29 14:07:31 +05:30
Scott McMurray
843c5e361e Rename IndexVec::lastlast_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-29 00:27:24 -07:00
lcnr
27a3b10ed2 check for intercrate mode when accessing the cache 2023-03-28 21:45:35 +02:00
Michael Goulet
53ec4bc631 Remove some stale FIXMEs in new solver 2023-03-25 01:51:19 +00:00
lcnr
a7ec045be8 disable global caching during coherence 2023-03-21 16:38:40 +01:00
lcnr
47f24a881b new solver cleanup + coherence 2023-03-21 16:27:25 +01:00
Boxy
ed63201224 replace usage of evaluate_goal with a new add_goal 2023-03-16 14:58:35 +00:00
Michael Goulet
d21e4d8411 Actually cache goals 2023-03-10 23:49:42 +00:00
Michael Goulet
67698aa6ad Move some solver stuff to middle 2023-03-10 23:46:38 +00:00
bors
0416b1a6f6 Auto merge of #108056 - matthiaskrgr:rollup-oa6bxvh, r=matthiaskrgr
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-14 21:07:04 +00:00
Santiago Pastorino
26136c6224 Reduce visibility of some items 2023-02-14 10:17:07 -03:00
Santiago Pastorino
c8dae10f14 Check for overflow in evaluate_canonical_goal 2023-02-14 09:51:39 -03:00
lcnr
51671cd435 add test for coinduction in new solver 2023-02-14 12:18:33 +01:00
Santiago Pastorino
826bee7085 Implement repeat_while_none for both SearchGraph and EvalCtxt 2023-02-13 14:45:39 -03:00
Santiago Pastorino
873c83ba56 Extract try_move_finished_goal_to_global_cache from try_finalize_goal 2023-02-13 14:45:37 -03:00
lcnr
a5164605bc correctly update goals in the cache 2023-02-08 19:11:14 +01:00
lcnr
85e6f38e79 assert that solver results are stable 2023-01-27 10:05:14 +01:00
lcnr
31ac29d989 update project to emulate a projection cache 2023-01-18 08:11:15 +01:00
lcnr
660c28391c remove assembly context and impl a bit more 2023-01-18 08:11:15 +01:00
lcnr
bf7dbff921 instantiate canonical vars eagerly 2023-01-18 08:11:13 +01:00