about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2023-04-06 21:26:38 -0400
committerJack Huey <31162821+jackh726@users.noreply.github.com>2023-04-06 23:01:38 -0400
commit167b70692ba2a97521237d36b487fbfccd3fb72b (patch)
treecc20ab34ab1b6d63cff827cac33ba58b93b78b24 /compiler/rustc_middle/src/ty
parent4646b3df6ad09f5cda12742ee98309b659006039 (diff)
downloadrust-167b70692ba2a97521237d36b487fbfccd3fb72b.tar.gz
rust-167b70692ba2a97521237d36b487fbfccd3fb72b.zip
Remove expect_anon and expect_anon_placeholder in favor of var
Diffstat (limited to 'compiler/rustc_middle/src/ty')
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index f6d79e94a51..76194f350f5 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -107,15 +107,6 @@ impl BoundRegionKind {
             _ => None,
         }
     }
-
-    pub fn expect_anon(&self) -> u32 {
-        match *self {
-            BoundRegionKind::BrNamed(_, _) | BoundRegionKind::BrEnv => {
-                bug!("expected anon region: {self:?}")
-            }
-            BoundRegionKind::BrAnon(idx, _) => idx,
-        }
-    }
 }
 
 pub trait Article {
@@ -1537,15 +1528,6 @@ pub enum BoundTyKind {
     Param(DefId, Symbol),
 }
 
-impl BoundTyKind {
-    pub fn expect_anon(self) -> u32 {
-        match self {
-            BoundTyKind::Anon(i) => i,
-            _ => bug!(),
-        }
-    }
-}
-
 impl From<BoundVar> for BoundTy {
     fn from(var: BoundVar) -> Self {
         BoundTy { var, kind: BoundTyKind::Anon(var.as_u32()) }