about summary refs log tree commit diff
diff options
context:
space:
mode:
authorscalexm <alexandre@scalexm.fr>2018-10-25 15:40:06 +0200
committerscalexm <alexandre@scalexm.fr>2018-11-03 11:41:55 +0100
commit07519975308af252a2fea6b89c3ad59374e29f39 (patch)
tree6972040f4ce992e1da0c5f5e914430eeb5950c88
parentaf8196b9d3b2e613c3a550a30445309d5feeb764 (diff)
downloadrust-07519975308af252a2fea6b89c3ad59374e29f39.tar.gz
rust-07519975308af252a2fea6b89c3ad59374e29f39.zip
Rename `as_bound_var` to `assert_bound_var`
-rw-r--r--src/librustc/infer/canonical/query_response.rs2
-rw-r--r--src/librustc/infer/canonical/substitute.rs2
-rw-r--r--src/librustc/ty/sty.rs2
-rw-r--r--src/librustc/ty/subst.rs2
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,
                 },