diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2023-04-06 21:26:38 -0400 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2023-04-06 23:01:38 -0400 |
| commit | 167b70692ba2a97521237d36b487fbfccd3fb72b (patch) | |
| tree | cc20ab34ab1b6d63cff827cac33ba58b93b78b24 /compiler/rustc_middle/src/ty | |
| parent | 4646b3df6ad09f5cda12742ee98309b659006039 (diff) | |
| download | rust-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.rs | 18 |
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()) } |
