Use !null pattern type in libcore

This commit is contained in:
Oli Scherer
2025-05-17 14:35:25 +00:00
committed by Oli Scherer
parent 624a067ea8
commit fe2553fe58
@@ -242,6 +242,10 @@ fn reduce_ty<'tcx>(cx: &LateContext<'tcx>, mut ty: Ty<'tcx>) -> ReducedTy<'tcx>
loop {
ty = cx.tcx.try_normalize_erasing_regions(cx.typing_env(), ty).unwrap_or(ty);
return match *ty.kind() {
ty::Pat(base, _) => {
ty = base;
continue;
},
ty::Array(sub_ty, _) if matches!(sub_ty.kind(), ty::Int(_) | ty::Uint(_)) => {
ReducedTy::TypeErasure { raw_ptr_only: false }
},