diff options
Diffstat (limited to 'compiler/rustc_middle/src/ty/util.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index e1081423489..f74bba134ab 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1237,7 +1237,7 @@ impl<'tcx> Ty<'tcx> { | ty::Str | ty::Never | ty::Ref(..) - | ty::RawPtr(_) + | ty::RawPtr(_, _) | ty::FnDef(..) | ty::Error(_) | ty::FnPtr(_) => true, @@ -1277,7 +1277,7 @@ impl<'tcx> Ty<'tcx> { | ty::Str | ty::Never | ty::Ref(..) - | ty::RawPtr(_) + | ty::RawPtr(_, _) | ty::FnDef(..) | ty::Error(_) | ty::FnPtr(_) => true, @@ -1401,7 +1401,7 @@ impl<'tcx> Ty<'tcx> { ty::Ref(..) | ty::Array(..) | ty::Slice(_) | ty::Tuple(..) => true, // Raw pointers use bitwise comparison. - ty::RawPtr(_) | ty::FnPtr(_) => true, + ty::RawPtr(_, _) | ty::FnPtr(_) => true, // Floating point numbers are not `Eq`. ty::Float(_) => false, @@ -1494,7 +1494,7 @@ impl<'tcx> ExplicitSelf<'tcx> { match *self_arg_ty.kind() { _ if is_self_ty(self_arg_ty) => ByValue, ty::Ref(region, ty, mutbl) if is_self_ty(ty) => ByReference(region, mutbl), - ty::RawPtr(ty::TypeAndMut { ty, mutbl }) if is_self_ty(ty) => ByRawPointer(mutbl), + ty::RawPtr(ty, mutbl) if is_self_ty(ty) => ByRawPointer(mutbl), ty::Adt(def, _) if def.is_box() && is_self_ty(self_arg_ty.boxed_ty()) => ByBox, _ => Other, } @@ -1519,7 +1519,7 @@ pub fn needs_drop_components<'tcx>( | ty::FnDef(..) | ty::FnPtr(_) | ty::Char - | ty::RawPtr(_) + | ty::RawPtr(_, _) | ty::Ref(..) | ty::Str => Ok(SmallVec::new()), @@ -1574,7 +1574,7 @@ pub fn is_trivially_const_drop(ty: Ty<'_>) -> bool { | ty::Infer(ty::IntVar(_)) | ty::Infer(ty::FloatVar(_)) | ty::Str - | ty::RawPtr(_) + | ty::RawPtr(_, _) | ty::Ref(..) | ty::FnDef(..) | ty::FnPtr(_) |
