rust/src/librustc_data_structures
bors 4879166194 Auto merge of #37294 - nikomatsakis:issue-37154, r=nikomatsakis
remove keys w/ skolemized regions from proj cache when popping skolemized regions

This addresses #37154 (a regression). The projection cache was incorrectly caching the results for skolemized regions -- when we pop skolemized regions, we are supposed to drop cache keys for them (just as we remove those skolemized regions from the region inference graph). This is because those skolemized region numbers will be reused later with different meaning (and we have determined that the old ones don't leak out in any meaningful way).

I did a *somewhat* aggressive fix here of only removing keys that mention the skolemized regions. One could imagine just removing all keys added since we started the skolemization (as indeed I did in my initial commit). This more aggressive fix required fixing a latent bug in `TypeFlags`, as an aside.

I believe the more aggressive fix is correct; clearly there can be entries that are unrelated to the skoelemized region, and it's a shame to remove them. My one concern was that it *is* possible I believe to have some region variables that are created and related to skolemized regions, and maybe some of them could end up in the cache. However, that seems harmless enough to me-- those relations will be removed, and couldn't have impacted how trait resolution proceeded anyway (iow, the cache entry is not wrong, though it is kind of useless).

r? @pnkfelix
cc @arielb1
2016-10-22 03:30:23 -07:00
..
control_flow_graph run rustfmt on control_flow_graph folder 2016-10-20 00:25:19 +05:30
graph run rustfmt on graph folder 2016-10-20 00:37:24 +05:30
obligation_forest Set stalled=false when encountering an error 2016-10-17 21:53:27 +02:00
snapshot_map only remove keys that mention skolemized regions 2016-10-21 11:13:36 -04:00
unify run rustfmt on unify folder 2016-10-20 00:38:55 +05:30
veccell apply rustfmt to librustc_data_structures, correcting rust-lang-nursery/rustfmt#836 2016-03-05 08:40:33 -05:00
bitslice.rs Move IdxSetBuf and BitSlice to rustc_data_structures 2016-10-10 20:26:26 -04:00
bitvec.rs generalize BitMatrix to be NxM and not just NxN 2016-08-09 08:26:06 -04:00
blake2b.rs ICH: Use 128-bit Blake2b hash instead of 64-bit SipHash for incr. comp. fingerprints. 2016-10-17 12:40:25 -04:00
Cargo.toml bootstrap: Add a bunch of Cargo.toml files 2016-02-11 11:12:32 -08:00
flock.rs Add support for the Haiku operating system on x86 and x86_64 machines 2016-09-25 11:12:23 -05:00
fnv.rs Documentation of what does for each type 2016-09-11 17:00:09 +05:30
indexed_set.rs Move IdxSetBuf and BitSlice to rustc_data_structures 2016-10-10 20:26:26 -04:00
indexed_vec.rs refactor rustc_metadata to use CamelCase names and IndexVec 2016-06-28 23:41:09 +03:00
ivar.rs apply rustfmt to librustc_data_structures, correcting rust-lang-nursery/rustfmt#836 2016-03-05 08:40:33 -05:00
lib.rs ICH: Use 128-bit Blake2b hash instead of 64-bit SipHash for incr. comp. fingerprints. 2016-10-17 12:40:25 -04:00
snapshot_vec.rs Plumb inference obligations through selection 2016-05-11 17:29:23 -07:00
transitive_relation.rs generalize BitMatrix to be NxM and not just NxN 2016-08-09 08:26:06 -04:00
tuple_slice.rs Add additional test cases to test all arities of tuple; And remove type suffix - i32 on integers 2016-06-11 22:31:24 +05:30