diff options
| -rw-r--r-- | src/librustc/infer/canonical/query_response.rs | 2 | ||||
| -rw-r--r-- | src/librustc/infer/canonical/substitute.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/sty.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/subst.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/infer/canonical/query_response.rs b/src/librustc/infer/canonical/query_response.rs index 4858d1d0919..5154abd6ce5 100644 --- a/src/librustc/infer/canonical/query_response.rs +++ b/src/librustc/infer/canonical/query_response.rs @@ -448,7 +448,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> { // We only allow a `ty::INNERMOST` index in substitutions. assert_eq!(index, ty::INNERMOST); - opt_values[br.as_bound_var()] = Some(*original_value); + opt_values[br.assert_bound_var()] = Some(*original_value); } } } diff --git a/src/librustc/infer/canonical/substitute.rs b/src/librustc/infer/canonical/substitute.rs index 3fd86f9c6a1..b8c1ed236c0 100644 --- a/src/librustc/infer/canonical/substitute.rs +++ b/src/librustc/infer/canonical/substitute.rs @@ -67,7 +67,7 @@ where value.clone() } else { let fld_r = |br: ty::BoundRegion| { - match var_values.var_values[br.as_bound_var()].unpack() { + match var_values.var_values[br.assert_bound_var()].unpack() { UnpackedKind::Lifetime(l) => l, r => bug!("{:?} is a region but value is {:?}", br, r), } diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index fbc77fdfea3..6929cb988d0 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -82,7 +82,7 @@ impl BoundRegion { /// regions with anonymous late bound regions. This method asserts that /// we have an anonymous late bound region, which hence may refer to /// a canonical variable. - pub fn as_bound_var(&self) -> BoundVar { + pub fn assert_bound_var(&self) -> BoundVar { match *self { BoundRegion::BrAnon(var) => BoundVar::from_u32(var), _ => bug!("bound region is not anonymous"), diff --git a/src/librustc/ty/subst.rs b/src/librustc/ty/subst.rs index 498d704eb9e..c1aed36c92d 100644 --- a/src/librustc/ty/subst.rs +++ b/src/librustc/ty/subst.rs @@ -568,7 +568,7 @@ impl CanonicalUserSubsts<'tcx> { ty::ReLateBound(index, br) => { // We only allow a `ty::INNERMOST` index in substitutions. assert_eq!(*index, ty::INNERMOST); - cvar == br.as_bound_var() + cvar == br.assert_bound_var() } _ => false, }, |
