diff options
| author | FedericoBruzzone <federico.bruzzone.i@gmail.com> | 2025-01-06 11:39:07 +0100 |
|---|---|---|
| committer | FedericoBruzzone <federico.bruzzone.i@gmail.com> | 2025-01-27 00:37:34 +0100 |
| commit | cef97bce7b2a0e6ef2208aaa1ec267b800d646af (patch) | |
| tree | 3bc712129173e067edf350690dac3b3ade8f2f63 /src | |
| parent | 15c6f7e1a3a0e51c9b18ce5b9a391e0c324b751c (diff) | |
| download | rust-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 'src')
| -rw-r--r-- | src/librustdoc/html/templates/type_layout.html | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/librustdoc/html/templates/type_layout.html b/src/librustdoc/html/templates/type_layout.html index aee96fb8c41..9c62826ccc2 100644 --- a/src/librustdoc/html/templates/type_layout.html +++ b/src/librustdoc/html/templates/type_layout.html @@ -28,13 +28,11 @@ {% endfor %} </ul> {% endif %} - {# This kind of layout error can occur with valid code, e.g. if you try to - get the layout of a generic type such as `Vec<T>`. #} + {# This kind of layout error can occur with valid code, for example + if there are trivial bounds: `struct Foo(str, str) where str: Sized;`. #} {% when Err(LayoutError::Unknown(_)) %} <p> {# #} - <strong>Note:</strong> Unable to compute type layout, {#+ #} - possibly due to this type having generic parameters. {#+ #} - Layout can only be computed for concrete, fully-instantiated types. {# #} + <strong>Note:</strong> Unable to compute type layout. {# #} </p> {# This kind of error probably can't happen with valid code, but we don't want to panic and prevent the docs from building, so we just let the @@ -44,6 +42,14 @@ <strong>Note:</strong> Encountered an error during type layout; {#+ #} the type was too big. {# #} </p> + {# This kind of layout error can occur with valid code, e.g. if you try to + get the layout of a generic type such as `Vec<T>`. #} + {% when Err(LayoutError::TooGeneric(_)) %} + <p> {# #} + <strong>Note:</strong> Unable to compute type layout, {#+ #} + possibly due to this type having generic parameters. {#+ #} + Layout can only be computed for concrete, fully-instantiated types. {# #} + </p> {% when Err(LayoutError::ReferencesError(_)) %} <p> {# #} <strong>Note:</strong> Encountered an error during type layout; {#+ #} |
