We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
UnexpectedUnsized
1 parent 85e2ea6 commit c0a8ad1Copy full SHA for c0a8ad1
compiler/rustc_ty_utils/src/layout.rs
@@ -109,7 +109,11 @@ fn map_error<'tcx>(
109
"encountered unexpected unsized field in layout of {ty:?}: {field:#?}"
110
));
111
}
112
- LayoutError::Unknown(ty)
+ if cx.tcx().features().trivial_bounds() {
113
+ LayoutError::UnexpectedUnsized(ty)
114
+ } else {
115
+ LayoutError::Unknown(ty)
116
+ }
117
118
LayoutCalculatorError::EmptyUnion => {
119
// This is always a compile error.
0 commit comments