Rollup merge of #136179 - oli-obk:push-vxvyttorquxw, r=BoxyUwU
Allow transmuting generic pattern types to and from their base Pattern types always have the same size as their base type, so we can just ignore the pattern and look at the base type for figuring out whether transmuting is possible.
This commit is contained in:
@@ -504,6 +504,9 @@ impl<'tcx> SizeSkeleton<'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
// Pattern types are always the same size as their base.
|
||||
ty::Pat(base, _) => SizeSkeleton::compute(base, tcx, typing_env),
|
||||
|
||||
_ => Err(err),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user