about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-02-11 16:27:56 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-02-11 16:27:56 +1100
commitc80466cb97d99cb5f226de6536f1f9a4022a7c97 (patch)
tree48198529de115604be8aae5b716ac35d7de5a367
parent2d725287e3ac05e5f7aa1c8f9f41011bd593c73a (diff)
downloadrust-c80466cb97d99cb5f226de6536f1f9a4022a7c97.tar.gz
rust-c80466cb97d99cb5f226de6536f1f9a4022a7c97.zip
Remove two dead functions.
-rw-r--r--src/librustc/infer/mod.rs8
-rw-r--r--src/librustc/ty/fold.rs25
2 files changed, 0 insertions, 33 deletions
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs
index 06c94d13334..dabe1755b0b 100644
--- a/src/librustc/infer/mod.rs
+++ b/src/librustc/infer/mod.rs
@@ -1291,14 +1291,6 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
         value.visit_with(&mut r)
     }
 
-    pub fn resolve_type_and_region_vars_if_possible<T>(&self, value: &T) -> T
-    where
-        T: TypeFoldable<'tcx>,
-    {
-        let mut r = resolve::OpportunisticTypeAndRegionResolver::new(self);
-        value.fold_with(&mut r)
-    }
-
     pub fn fully_resolve<T: TypeFoldable<'tcx>>(&self, value: &T) -> FixupResult<T> {
         /*!
          * Attempts to resolve all type/region variables in
diff --git a/src/librustc/ty/fold.rs b/src/librustc/ty/fold.rs
index 306c69666e5..551554b7e7f 100644
--- a/src/librustc/ty/fold.rs
+++ b/src/librustc/ty/fold.rs
@@ -586,31 +586,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
         }).0
     }
 
-    /// Flattens multiple binding levels into one. So `for<'a> for<'b> Foo`
-    /// becomes `for<'a,'b> Foo`.
-    pub fn flatten_late_bound_regions<T>(self, bound2_value: &Binder<Binder<T>>)
-                                         -> Binder<T>
-        where T: TypeFoldable<'tcx>
-    {
-        let bound0_value = bound2_value.skip_binder().skip_binder();
-        let value = self.fold_regions(bound0_value, &mut false, |region, current_depth| {
-            match *region {
-                ty::ReLateBound(debruijn, br) => {
-                    // We assume no regions bound *outside* of the
-                    // binders in `bound2_value` (nmatsakis added in
-                    // the course of this PR; seems like a reasonable
-                    // sanity check though).
-                    assert!(debruijn == current_depth);
-                    self.mk_region(ty::ReLateBound(current_depth, br))
-                }
-                _ => {
-                    region
-                }
-            }
-        });
-        Binder::bind(value)
-    }
-
     /// Returns a set of all late-bound regions that are constrained
     /// by `value`, meaning that if we instantiate those LBR with
     /// variables and equate `value` with something else, those