about summary refs log tree commit diff
path: root/compiler/rustc_transmute/src/layout/tree.rs
diff options
context:
space:
mode:
authorFedericoBruzzone <federico.bruzzone.i@gmail.com>2025-01-06 11:39:07 +0100
committerFedericoBruzzone <federico.bruzzone.i@gmail.com>2025-01-27 00:37:34 +0100
commitcef97bce7b2a0e6ef2208aaa1ec267b800d646af (patch)
tree3bc712129173e067edf350690dac3b3ade8f2f63 /compiler/rustc_transmute/src/layout/tree.rs
parent15c6f7e1a3a0e51c9b18ce5b9a391e0c324b751c (diff)
downloadrust-cef97bce7b2a0e6ef2208aaa1ec267b800d646af.tar.gz
rust-cef97bce7b2a0e6ef2208aaa1ec267b800d646af.zip
Add `TooGeneric` variant to `LayoutError` and emit `Unknown` one
- `check-pass` test for a MRE of #135020
- fail test for #135138
- switch to `TooGeneric` for checking CMSE fn signatures
- switch to `TooGeneric` for compute `SizeSkeleton` (for transmute)
- fix broken tests
Diffstat (limited to 'compiler/rustc_transmute/src/layout/tree.rs')
-rw-r--r--compiler/rustc_transmute/src/layout/tree.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs
index 6ce9969aefe..b00585d2922 100644
--- a/compiler/rustc_transmute/src/layout/tree.rs
+++ b/compiler/rustc_transmute/src/layout/tree.rs
@@ -197,6 +197,7 @@ pub(crate) mod rustc {
             match err {
                 LayoutError::Unknown(..)
                 | LayoutError::ReferencesError(..)
+                | LayoutError::TooGeneric(..)
                 | LayoutError::NormalizationFailure(..) => Self::UnknownLayout,
                 LayoutError::SizeOverflow(..) => Self::SizeOverflow,
                 LayoutError::Cycle(err) => Self::TypeError(*err),