Commit Graph

95510 Commits

Author SHA1 Message Date
Niko Matsakis
6234aed6c7 opaque_types: various nits 2019-07-02 12:25:22 -04:00
Niko Matsakis
6cab003fd1 cleanup formatting of comment and add attribution 2019-07-02 12:25:22 -04:00
Niko Matsakis
9588f7fe74 rewrite dup_vec to use IndexVec instead of u32 2019-07-02 12:25:22 -04:00
Niko Matsakis
b4a3753cfb various centril nits 2019-07-02 12:25:22 -04:00
Niko Matsakis
d2772e8989 explain why the code is the way it is 2019-07-02 12:25:22 -04:00
Niko Matsakis
56ae0bfc79 Update src/librustc/infer/lexical_region_resolve/mod.rs
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-02 12:25:22 -04:00
Niko Matsakis
cf721c5c73 Update src/doc/unstable-book/src/language-features/member-constraints.md
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-02 12:25:22 -04:00
Niko Matsakis
74a6efbf00 feature-gate member constraints outside of async-await
Minimizes risk.
2019-07-02 12:25:22 -04:00
Niko Matsakis
cbc75c699c implement TypeFoldable for Arc 2019-07-02 12:25:22 -04:00
Niko Matsakis
134fc4a929 rename pick_constraints.rs to member_constraints.rs 2019-07-02 12:25:22 -04:00
Niko Matsakis
eca55b58d6 rename to "member constraints" 2019-07-02 12:25:22 -04:00
Niko Matsakis
e39f66a859 implement Lift for Arc 2019-07-02 12:25:22 -04:00
Niko Matsakis
e6b6873525 switch to Lrc 2019-07-02 12:25:22 -04:00
Niko Matsakis
fb2c997d4e fix silly bugs in binary_search_util test 2019-07-02 12:25:22 -04:00
Niko Matsakis
5d44bebb32 bless test output 2019-07-02 12:25:21 -04:00
Niko Matsakis
adba6a8f90 address nits by mattewjasper 2019-07-02 12:25:21 -04:00
Niko Matsakis
0b15a66a80 account for the pick-constraint edges when reporting errors
Also, thread through better span info to improve the error message to
something tolerable.
2019-07-02 12:25:21 -04:00
Niko Matsakis
3e01c7416a just create a binary search slice helper fn 2019-07-02 12:25:16 -04:00
Niko Matsakis
89a205bf44 add a VecMap data structure 2019-07-02 12:15:21 -04:00
Niko Matsakis
e9de08a5ea test with explicit existential type 2019-07-02 12:15:21 -04:00
Niko Matsakis
b170c0f1c4 add a preliminary existential test; not really enough 2019-07-02 12:15:21 -04:00
Niko Matsakis
a18c779fa2 pacify the mercilous tidy
long lines, trailing newlines
2019-07-02 12:15:21 -04:00
Niko Matsakis
4831146afa remove outdated TODO markers
These were left behind to remind me to cleanup the code -- but the
relevant cleanups were already done.
2019-07-02 12:15:21 -04:00
Niko Matsakis
2ea6094938 explain why pick-constraints can be an empty vector 2019-07-02 12:15:21 -04:00
Niko Matsakis
4de99600b0 add a FIXME related to the non-free-region case
I don't think it would actually be harmful to just ignore such cases
but I'm inclined not to take chances.
2019-07-02 12:15:21 -04:00
Niko Matsakis
2057136326 update the async-fn-multiple-lifetimes test 2019-07-02 12:15:20 -04:00
Niko Matsakis
b5fb906766 fix tests and remove outdated stderr files 2019-07-02 12:15:20 -04:00
Niko Matsakis
8d39bdd5f9 integrate reverse graph and upper-bound computation 2019-07-02 12:15:20 -04:00
Niko Matsakis
7fd0db7dd3 add a depth_first_search helper function 2019-07-02 12:15:20 -04:00
Niko Matsakis
4c91bb9571 introduce a VecGraph abstraction that cheaply stores graphs
This is perhaps better than the linked list approach I was using
before. Lower memory overhead, Theta(N+E) storage. Does require a
sort. =)
2019-07-02 12:15:20 -04:00
Niko Matsakis
4e85665e08 implement the graph traits for SCC 2019-07-02 12:15:20 -04:00
Niko Matsakis
07ee532031 improve tests with migration mode, mir mode 2019-07-02 12:15:20 -04:00
Niko Matsakis
cc581bfa0e remove old error and add an explanation 2019-07-02 12:15:20 -04:00
Niko Matsakis
ec48b4ebe2 preliminary integration of "pick constraints" into nll solver 2019-07-02 12:15:20 -04:00
Niko Matsakis
3b5a7276d2 construct pick-constraints and give them to region inference 2019-07-02 12:15:20 -04:00
Niko Matsakis
d9596692a5 implement PickConstraintSet type 2019-07-02 12:15:20 -04:00
Niko Matsakis
330cb7668c pass more than outlives constraints to constraint conversion 2019-07-02 12:15:20 -04:00
Niko Matsakis
3aad20d8f8 [WIP] fix Lift impl for Rc 2019-07-02 12:15:20 -04:00
Niko Matsakis
6ead1c8699 rename ConstraintSet to OutlivesConstraintSet 2019-07-02 12:15:20 -04:00
Niko Matsakis
ddc63ce19f propagate the pick-constraints through queries 2019-07-02 12:15:20 -04:00
Niko Matsakis
f933e0971b pass a &mut QueryRegionConstraints not just outlives constraints 2019-07-02 12:15:20 -04:00
Niko Matsakis
ec560e2c6d remove deref impl and add an index impl
The constraint set is going to be more than just a set of outlives
constraints.
2019-07-02 12:15:19 -04:00
Niko Matsakis
f673b24ba2 rename ConstraintIndex to OutlivesConstraintIndex 2019-07-02 12:15:19 -04:00
Niko Matsakis
09bba9b89d introduce QueryRegionConstraints struct 2019-07-02 12:15:19 -04:00
Niko Matsakis
7e66a96d58 introduce QueryRegionConstraints struct (no-op) 2019-07-02 12:15:19 -04:00
Niko Matsakis
fd5f7673a7 rename QueryRegionConstraint to QueryOutlivesConstraint 2019-07-02 12:15:19 -04:00
Niko Matsakis
d6ec0ae777 enforce and report pick-constraint errors
The error message here is not great.
2019-07-02 12:15:19 -04:00
Niko Matsakis
f0eebcd02f integrate pick constraints into lexical solver more completely 2019-07-02 12:15:19 -04:00
Niko Matsakis
02609b85e3 rename from "in constraint" to "pick constraint" 2019-07-02 12:15:19 -04:00
Niko Matsakis
c36205b48e add some tests, currently ICE-ing 2019-07-02 12:15:19 -04:00