Auto merge of #54649 - nikomatsakis:universes-refactor-1, r=scalexm

adopt "placeholders" to represent universally quantified regions

This does a few preliminary refactorings that lay some groundwork for moving towards universe integration. Two things, primarily:

- Rename from "skolemized" to "placeholder"
- When instantiating `for<'a, 'b, 'c>`, just create one universe for all 3 regions, and distinguish them from one another using the `BoundRegion`.
    - This is more accurate, and I think that in general we'll be moving towards a model of separating "binder" (universe, debruijn index) from "index within binder" in a number of places.
    - In principle, it feels the current setup of making lots of universes could lead to us doing the wrong thing, but I've actually not been able to come up with an example where this is so.

r? @scalexm
cc @arielb1
This commit is contained in:
bors 2018-10-04 20:28:57 +00:00
commit 8c4ad4e9e4
34 changed files with 1868 additions and 1532 deletions

View file

@ -10,8 +10,8 @@
#![allow(dead_code)]
// Regression test for #37154: the problem here was that the cache
// results in a false error because it was caching skolemized results
// even after those skolemized regions had been popped.
// results in a false error because it was caching placeholder results
// even after those placeholder regions had been popped.
trait Foo {
fn method(&self) {}