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:
commit
aab61ad663
3 changed files with 56 additions and 0 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue