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.
TooGeneric
1 parent 5de4857 commit 74e774eCopy full SHA for 74e774e
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::TooGeneric(ty)
114
+ } else {
115
+ LayoutError::Unknown(ty)
116
+ }
117
118
LayoutCalculatorError::EmptyUnion => {
119
// This is always a compile error.
0 commit comments