about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-04-01 10:44:00 -0400
committerCorey Richardson <corey@octayn.net>2014-04-02 11:17:23 -0400
commit1a98ec83c1a470ef18ee6fa9b2eedc237032d64c (patch)
tree999b9ede10a9f82b3c06a67f39db7439953e60fe /src
parentdcb01ff573b5f4404d2e4ef6700dca63e91f0eb4 (diff)
downloadrust-1a98ec83c1a470ef18ee6fa9b2eedc237032d64c.tar.gz
rust-1a98ec83c1a470ef18ee6fa9b2eedc237032d64c.zip
middle: typeck: infer: combine: remove dead code
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/typeck/infer/combine.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/librustc/middle/typeck/infer/combine.rs b/src/librustc/middle/typeck/infer/combine.rs
index af84e915f70..4a03e32dee8 100644
--- a/src/librustc/middle/typeck/infer/combine.rs
+++ b/src/librustc/middle/typeck/infer/combine.rs
@@ -373,28 +373,6 @@ pub fn eq_regions<C:Combine>(this: &C, a: ty::Region, b: ty::Region)
     })
 }
 
-pub fn eq_opt_regions<C:Combine>(
-    this: &C,
-    a: Option<ty::Region>,
-    b: Option<ty::Region>) -> cres<Option<ty::Region>> {
-
-    match (a, b) {
-        (None, None) => Ok(None),
-        (Some(a), Some(b)) => eq_regions(this, a, b).then(|| Ok(Some(a))),
-        (_, _) => {
-            // If these two substitutions are for the same type (and
-            // they should be), then the type should either
-            // consistently have a region parameter or not have a
-            // region parameter.
-            this.infcx().tcx.sess.bug(
-                format!("substitution a had opt_region {} and \
-                      b had opt_region {}",
-                     a.inf_str(this.infcx()),
-                     b.inf_str(this.infcx())));
-        }
-    }
-}
-
 pub fn super_fn_sigs<C:Combine>(this: &C, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
 
     fn argvecs<C:Combine>(this: &C, a_args: &[ty::t], b_args: &[ty::t]) -> cres<Vec<ty::t> > {