about summary refs log tree commit diff
path: root/src/librustc/infer
diff options
context:
space:
mode:
authorscalexm <alexandre@scalexm.fr>2018-11-02 15:08:51 +0100
committerscalexm <alexandre@scalexm.fr>2018-11-24 01:24:40 +0100
commit7401e3def59452e795468d4d5e4f30c7ef100fec (patch)
tree21021e0d1d855c7942915db208444cda8bb2f15b /src/librustc/infer
parent1f57e4841157d5cbd4c4e22018f93bd1801c98c2 (diff)
downloadrust-7401e3def59452e795468d4d5e4f30c7ef100fec.tar.gz
rust-7401e3def59452e795468d4d5e4f30c7ef100fec.zip
Distinguish between placeholder kinds
Diffstat (limited to 'src/librustc/infer')
-rw-r--r--src/librustc/infer/canonical/mod.rs6
-rw-r--r--src/librustc/infer/higher_ranked/mod.rs2
-rw-r--r--src/librustc/infer/mod.rs2
-rw-r--r--src/librustc/infer/nll_relate/mod.rs4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc/infer/canonical/mod.rs b/src/librustc/infer/canonical/mod.rs
index f7eb7118f41..41839d61d32 100644
--- a/src/librustc/infer/canonical/mod.rs
+++ b/src/librustc/infer/canonical/mod.rs
@@ -142,7 +142,7 @@ pub enum CanonicalVarKind {
     /// A "placeholder" that represents "any region". Created when you
     /// are solving a goal like `for<'a> T: Foo<'a>` to represent the
     /// bound region `'a`.
-    PlaceholderRegion(ty::Placeholder),
+    PlaceholderRegion(ty::PlaceholderRegion),
 }
 
 impl CanonicalVarKind {
@@ -374,9 +374,9 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
                 universe_map(ui),
             ).into(),
 
-            CanonicalVarKind::PlaceholderRegion(ty::Placeholder { universe, name }) => {
+            CanonicalVarKind::PlaceholderRegion(ty::PlaceholderRegion { universe, name }) => {
                 let universe_mapped = universe_map(universe);
-                let placeholder_mapped = ty::Placeholder {
+                let placeholder_mapped = ty::PlaceholderRegion {
                     universe: universe_mapped,
                     name,
                 };
diff --git a/src/librustc/infer/higher_ranked/mod.rs b/src/librustc/infer/higher_ranked/mod.rs
index 8172f620c36..ddf46b18ef7 100644
--- a/src/librustc/infer/higher_ranked/mod.rs
+++ b/src/librustc/infer/higher_ranked/mod.rs
@@ -340,7 +340,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
         let next_universe = self.create_next_universe();
 
         let (result, map) = self.tcx.replace_late_bound_regions(binder, |br| {
-            self.tcx.mk_region(ty::RePlaceholder(ty::Placeholder {
+            self.tcx.mk_region(ty::RePlaceholder(ty::PlaceholderRegion {
                 universe: next_universe,
                 name: br,
             }))
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs
index 87e32be1a17..dfe6aa160b3 100644
--- a/src/librustc/infer/mod.rs
+++ b/src/librustc/infer/mod.rs
@@ -411,7 +411,7 @@ pub enum NLLRegionVariableOrigin {
 
     /// "Universal" instantiation of a higher-ranked region (e.g.,
     /// from a `for<'a> T` binder). Meant to represent "any region".
-    Placeholder(ty::Placeholder),
+    Placeholder(ty::PlaceholderRegion),
 
     Existential,
 }
diff --git a/src/librustc/infer/nll_relate/mod.rs b/src/librustc/infer/nll_relate/mod.rs
index e003c1989e0..9bdbf77fee0 100644
--- a/src/librustc/infer/nll_relate/mod.rs
+++ b/src/librustc/infer/nll_relate/mod.rs
@@ -95,7 +95,7 @@ pub trait TypeRelatingDelegate<'tcx> {
     /// So e.g. if you have `for<'a> fn(..) <: for<'b> fn(..)`, then
     /// we will invoke this method to instantiate `'b` with a
     /// placeholder region.
-    fn next_placeholder_region(&mut self, placeholder: ty::Placeholder) -> ty::Region<'tcx>;
+    fn next_placeholder_region(&mut self, placeholder: ty::PlaceholderRegion) -> ty::Region<'tcx>;
 
     /// Creates a new existential region in the given universe. This
     /// is used when handling subtyping and type variables -- if we
@@ -176,7 +176,7 @@ where
                         universe
                     });
 
-                    let placeholder = ty::Placeholder { universe, name: br };
+                    let placeholder = ty::PlaceholderRegion { universe, name: br };
                     delegate.next_placeholder_region(placeholder)
                 } else {
                     delegate.next_existential_region_var()