Skip to content

Commit 1a98ec8

Browse files
committed
middle: typeck: infer: combine: remove dead code
1 parent dcb01ff commit 1a98ec8

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/librustc/middle/typeck/infer/combine.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -373,28 +373,6 @@ pub fn eq_regions<C:Combine>(this: &C, a: ty::Region, b: ty::Region)
373373
})
374374
}
375375

376-
pub fn eq_opt_regions<C:Combine>(
377-
this: &C,
378-
a: Option<ty::Region>,
379-
b: Option<ty::Region>) -> cres<Option<ty::Region>> {
380-
381-
match (a, b) {
382-
(None, None) => Ok(None),
383-
(Some(a), Some(b)) => eq_regions(this, a, b).then(|| Ok(Some(a))),
384-
(_, _) => {
385-
// If these two substitutions are for the same type (and
386-
// they should be), then the type should either
387-
// consistently have a region parameter or not have a
388-
// region parameter.
389-
this.infcx().tcx.sess.bug(
390-
format!("substitution a had opt_region {} and \
391-
b had opt_region {}",
392-
a.inf_str(this.infcx()),
393-
b.inf_str(this.infcx())));
394-
}
395-
}
396-
}
397-
398376
pub fn super_fn_sigs<C:Combine>(this: &C, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
399377

400378
fn argvecs<C:Combine>(this: &C, a_args: &[ty::t], b_args: &[ty::t]) -> cres<Vec<ty::t> > {

0 commit comments

Comments
 (0)