David Wood
fd0806618c
Constraints are now being categorized, sorted and the error labelled. Categorization needs a bit of work.
2018-07-01 15:33:05 +01:00
David Wood
56274be4b5
Added bfs for constraint paths from regions.
2018-07-01 15:30:43 +01:00
Niko Matsakis
9e2157fdca
don't consider assignments to temporaries "interesting"
2018-07-01 15:30:43 +01:00
Niko Matsakis
0b620186fd
propagate boring vs interesting causal info for constraints/tests
2018-07-01 15:30:42 +01:00
Niko Matsakis
609bb27514
categorize Locations
as interesting or boring
2018-07-01 15:27:15 +01:00
Niko Matsakis
dbeda5ee29
remove the at_location
from Locations
...
We are not currently using it for anything; even polonius just uses
the `from_location`.
2018-07-01 15:27:10 +01:00
Niko Matsakis
73f8333e78
update mir-opt tests
2018-07-01 10:13:05 -04:00
Niko Matsakis
865320f6a4
remove the ins
set altogether
2018-07-01 10:13:05 -04:00
Niko Matsakis
5ddda3f195
rename ToLocations
to NormalizeLocation
2018-07-01 15:00:34 +01:00
bors
e100ce4f92
Auto merge of #51855 - Eh2406:i51821, r=nikomatsakis
...
A fix for 51821
This dedupe the vec of `OutlivesConstraint` using a `FxHashSet<(RegionVid, RegionVid)>` it alsow adds a `struct ConstraintSet` to encapsulate/ensure this behavere.
2018-07-01 10:41:51 +00:00
Niko Matsakis
ac5bd5dd2b
remove the FxHashSet since it's not helping us in practice
...
It turns out that we don't have duplicates, just self-cycles.
2018-07-01 05:53:35 -04:00
Vadim Petrochenkov
9f92fce77c
Fortify dummy span checking
2018-06-30 01:53:32 +03:00
Eh2406
6e0cefe3db
add comments
2018-06-28 10:18:35 -04:00
Eh2406
ad71cbfe66
use deref instead of inner
2018-06-28 10:18:33 -04:00
Eh2406
4b44db126e
each_affected_by_dirty
2018-06-28 10:18:32 -04:00
Eh2406
9bd2a63f29
remove inner_mut as it can mess up invariants
2018-06-28 10:18:31 -04:00
Eh2406
497a3b4fd5
fix typo and tidy
2018-06-28 10:18:30 -04:00
Eh2406
e2c0378a63
move related types into the new module
2018-06-28 10:18:29 -04:00
Eh2406
e4f03682df
use the type system to ensure we dedup from the start
2018-06-28 10:18:25 -04:00
Eh2406
0119669711
use retain to avoid the allocation
2018-06-28 10:15:37 -04:00
Eh2406
8a356011ae
Remove duplicates
2018-06-28 10:15:37 -04:00
bors
99a9d6806d
Auto merge of #51538 - nikomatsakis:nll-perf-examination, r=eddyb
...
convert NLL ops to caches
This is a extension of <https://github.com/rust-lang/rust/pull/51460 >. It uses a lot more caching than we used to do. This caching is not yet as efficient as it could be, but I'm curious to see the current perf results.
This is the high-level idea: in the MIR type checker, use [canonicalized queries](https://rust-lang-nursery.github.io/rustc-guide/traits/canonical-queries.html ) for all the major operations. This is helpful because the MIR type check is operating in a context where all types are fully known (mostly, anyway) but regions are completely renumbered. This means we often wind up with duplicate queries like `Foo<'1, '2> :Bar` and `Foo<'3, '4>: Bar`. Canonicalized queries let us re-use the results. By the final commit in this PR, we can essentially just "read off" the resulting region relations and add them to the NLL type check.
2018-06-28 01:41:40 +00:00
Niko Matsakis
0a0dae0964
pull out ParamEnvAnd
and remove QueryKey
2018-06-27 15:45:49 -04:00
Vytautas Astrauskas
03ecd982bf
Fix the error of selecting obligation by not running the borrow checker.
2018-06-27 18:14:00 +02:00
Vytautas Astrauskas
612eeb1df7
Fix NLL issue 50716 and add a regression test.
2018-06-27 18:13:43 +02:00
Niko Matsakis
e895f3aded
convert dropck_outlives
type-op to use the query
2018-06-26 12:41:47 -04:00
Niko Matsakis
7c72e778ab
instantiate closure requirements as query-region-constraints [WIP]
...
Marked as WIP because it invalidates some tests.
2018-06-26 10:59:40 -04:00
Niko Matsakis
3e32d42532
transition to Fallible
2018-06-26 10:59:40 -04:00
Niko Matsakis
2a0b3d6224
introduce Normalizable
trait for things directly normalizable
2018-06-26 10:59:40 -04:00
Niko Matsakis
d6136837b7
convert predicates
to operate on 1 predicate at a time
2018-06-26 10:59:40 -04:00
Niko Matsakis
2655522580
move type_op
into rustc
2018-06-26 10:59:40 -04:00
Niko Matsakis
3b446b4b91
introduce QueryTypeOp
trait and use it for eq
2018-06-26 10:59:40 -04:00
Niko Matsakis
e72dc79488
make convert
so it can apply to a single constraint
2018-06-26 10:49:24 -04:00
Niko Matsakis
3f1961d62e
extract type-ops into their own submodules
2018-06-26 10:49:24 -04:00
Niko Matsakis
7cb86ed1e3
change to crate
privacy instead of pub(super)
2018-06-26 10:49:24 -04:00
Niko Matsakis
7358931a1c
improve trivial_case
handling
2018-06-26 10:49:24 -04:00
Niko Matsakis
c8cf710ce0
replace LexicalRegionConstraintData
with QueryRegionConstraint
2018-06-26 10:49:24 -04:00
Niko Matsakis
71234278fa
align the type-op
outputs with what canonicalized queries give
2018-06-26 10:31:49 -04:00
Niko Matsakis
6ac89174b8
mk fully_perform_op_and_get_region_constraint_data
a TypeOp method
2018-06-26 10:31:49 -04:00
Niko Matsakis
efc84c83f9
remove the TypeOp
vs InfcxTypeOp
distinction
2018-06-26 10:31:49 -04:00
Niko Matsakis
dee18864ad
promote type_op
into a mod.rs
file
2018-06-26 10:31:49 -04:00
Niko Matsakis
252a6dfa35
introduce DropckOutlives
type-op
2018-06-26 10:31:49 -04:00
Niko Matsakis
7a641cb145
make TypeOp
implement debug instead of carrying a closure
...
This allows us to avoid some silly clones etc.
2018-06-26 10:31:49 -04:00
Niko Matsakis
e7a9e7aef2
extract a enabled
helper to remove some ad-hoc conditionals
2018-06-26 10:31:49 -04:00
Niko Matsakis
13e77934e5
create InfcxTypeOp
that only depend on an infcx
...
We want any add'l context required to be passed through the struct
itself.
2018-06-26 10:31:49 -04:00
Niko Matsakis
846cc263cf
make normalize into an op
2018-06-26 10:31:49 -04:00
Niko Matsakis
f998628e5c
let trivial_noop
take ownership of self
2018-06-26 10:31:49 -04:00
Niko Matsakis
8147d17d8e
make normalize
take ownership of the thing to be normalized
2018-06-26 10:31:49 -04:00
Niko Matsakis
214d7650c9
introduce prove_predicates
type op
2018-06-26 10:31:49 -04:00
Niko Matsakis
7c62461c39
introduce trivial_noop
to accommodate micro-optimizations
2018-06-26 10:31:49 -04:00