1
Fork 0

Remove Ty::is_region_ptr

This commit is contained in:
Mu42 2023-03-20 15:32:21 +08:00
parent da7c50c089
commit 20dc532085
8 changed files with 12 additions and 24 deletions

View file

@ -1913,11 +1913,6 @@ impl<'tcx> Ty<'tcx> {
}
}
#[inline]
pub fn is_region_ptr(self) -> bool {
matches!(self.kind(), Ref(..))
}
#[inline]
pub fn is_mutable_ptr(self) -> bool {
matches!(
@ -1944,7 +1939,7 @@ impl<'tcx> Ty<'tcx> {
/// Tests if this is any kind of primitive pointer type (reference, raw pointer, fn pointer).
#[inline]
pub fn is_any_ptr(self) -> bool {
self.is_region_ptr() || self.is_unsafe_ptr() || self.is_fn_ptr()
self.is_ref() || self.is_unsafe_ptr() || self.is_fn_ptr()
}
#[inline]