diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-06-26 15:40:45 -0400 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-09-08 20:55:55 -0400 |
| commit | 1ca9eb8ec3bcf8860d08a4e92f0eb8ebbf112fc4 (patch) | |
| tree | 1dfc3c24565deb51caebc3acc00391267d444a5d /compiler/rustc_middle | |
| parent | dd0335a27f03c0b654c49d188e122c3a0776c6a3 (diff) | |
| download | rust-1ca9eb8ec3bcf8860d08a4e92f0eb8ebbf112fc4.tar.gz rust-1ca9eb8ec3bcf8860d08a4e92f0eb8ebbf112fc4.zip | |
Remove ReEmpty
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 8 |
2 files changed, 2 insertions, 16 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 1ae3063dae4..9dbefe33772 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -1978,7 +1978,7 @@ impl<'tcx> PrettyPrinter<'tcx> for FmtPrinter<'_, 'tcx> { ty::ReVar(_) | ty::ReErased => false, - ty::ReStatic | ty::ReEmpty(_) => true, + ty::ReStatic => true, } } @@ -2062,14 +2062,6 @@ impl<'tcx> FmtPrinter<'_, 'tcx> { p!("'static"); return Ok(self); } - ty::ReEmpty(ty::UniverseIndex::ROOT) => { - p!("'<empty>"); - return Ok(self); - } - ty::ReEmpty(ui) => { - p!(write("'<empty:{:?}>", ui)); - return Ok(self); - } } p!("'_"); diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 9fb91b5fe87..a8d2ca4a24e 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1511,7 +1511,6 @@ impl<'tcx> Region<'tcx> { ty::ReStatic => true, ty::ReVar(..) => false, ty::RePlaceholder(placeholder) => placeholder.name.is_named(), - ty::ReEmpty(_) => false, ty::ReErased => false, } } @@ -1537,11 +1536,6 @@ impl<'tcx> Region<'tcx> { } #[inline] - pub fn is_empty(self) -> bool { - matches!(*self, ty::ReEmpty(..)) - } - - #[inline] pub fn bound_at_or_above_binder(self, index: ty::DebruijnIndex) -> bool { match *self { ty::ReLateBound(debruijn, _) => debruijn >= index, @@ -1572,7 +1566,7 @@ impl<'tcx> Region<'tcx> { flags = flags | TypeFlags::HAS_FREE_REGIONS; flags = flags | TypeFlags::HAS_FREE_LOCAL_REGIONS; } - ty::ReEmpty(_) | ty::ReStatic => { + ty::ReStatic => { flags = flags | TypeFlags::HAS_FREE_REGIONS; } ty::ReLateBound(..) => { |
