mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
80263e17a3
fix: Guard SizeSkeleton::compute against stack overflow Fixes rust-lang/rust#156137 Fix: extract the recursion into a private `compute_inner` that carries a depth counter. When depth exceeds the crate's recursion limit, return `LayoutError::Unknown` and let the existing transmute size-check produce a normal error instead of crashing. A regression test is included in `tests/ui/transmute/`.