We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfc1bd7 commit 155b46aCopy full SHA for 155b46a
src/common.rs
@@ -69,7 +69,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ
69
FloatTy::F128 => unimplemented!("f16_f128"),
70
},
71
ty::FnPtr(_) => pointer_ty(tcx),
72
- ty::RawPtr(TypeAndMut { ty: pointee_ty, mutbl: _ }) | ty::Ref(_, pointee_ty, _) => {
+ ty::RawPtr(pointee_ty, _) | ty::Ref(_, pointee_ty, _) => {
73
if has_ptr_meta(tcx, *pointee_ty) {
74
return None;
75
} else {
@@ -89,7 +89,7 @@ fn clif_pair_type_from_ty<'tcx>(
89
ty::Tuple(types) if types.len() == 2 => {
90
(clif_type_from_ty(tcx, types[0])?, clif_type_from_ty(tcx, types[1])?)
91
}
92
93
94
(pointer_ty(tcx), pointer_ty(tcx))
95
src/unsize.rs
@@ -70,10 +70,8 @@ fn unsize_ptr<'tcx>(
) -> (Value, Value) {
match (&src_layout.ty.kind(), &dst_layout.ty.kind()) {
(&ty::Ref(_, a, _), &ty::Ref(_, b, _))
- | (&ty::Ref(_, a, _), &ty::RawPtr(ty::TypeAndMut { ty: b, .. }))
- | (&ty::RawPtr(ty::TypeAndMut { ty: a, .. }), &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) => {
- (src, unsized_info(fx, *a, *b, old_info))
76
- }
+ | (&ty::Ref(_, a, _), &ty::RawPtr(b, _))
+ | (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => (src, unsized_info(fx, *a, *b, old_info)),
77
(&ty::Adt(def_a, _), &ty::Adt(def_b, _)) => {
78
assert_eq!(def_a, def_b);
79
src/value_and_place.rs
@@ -865,15 +865,10 @@ pub(crate) fn assert_assignable<'tcx>(
865
return;
866
867
match (from_ty.kind(), to_ty.kind()) {
868
- (ty::Ref(_, a, _), ty::Ref(_, b, _))
869
- | (
870
- ty::RawPtr(TypeAndMut { ty: a, mutbl: _ }),
871
- ty::RawPtr(TypeAndMut { ty: b, mutbl: _ }),
872
- ) => {
+ (ty::Ref(_, a, _), ty::Ref(_, b, _)) | (ty::RawPtr(a, _), ty::RawPtr(b, _)) => {
873
assert_assignable(fx, *a, *b, limit - 1);
874
875
- (ty::Ref(_, a, _), ty::RawPtr(TypeAndMut { ty: b, mutbl: _ }))
876
- | (ty::RawPtr(TypeAndMut { ty: a, mutbl: _ }), ty::Ref(_, b, _)) => {
+ (ty::Ref(_, a, _), ty::RawPtr(b, _)) | (ty::RawPtr(a, _), ty::Ref(_, b, _)) => {
877
878
879
(ty::FnPtr(_), ty::FnPtr(_)) => {
0 commit comments