We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74e774e commit 0ef08fbCopy full SHA for 0ef08fb
compiler/rustc_ty_utils/src/layout.rs
@@ -104,7 +104,7 @@ fn map_error<'tcx>(
104
// This is sometimes not a compile error if there are trivially false where clauses.
105
// See `tests/ui/layout/trivial-bounds-sized.rs` for an example.
106
assert!(field.layout.is_unsized(), "invalid layout error {err:#?}");
107
- if !field.ty.is_sized(cx.tcx(), cx.typing_env) {
+ if cx.typing_env.param_env.caller_bounds().is_empty() {
108
cx.tcx().dcx().delayed_bug(format!(
109
"encountered unexpected unsized field in layout of {ty:?}: {field:#?}"
110
));
0 commit comments