Skip to content

Commit 5a546aa

Browse files
Remove wrong assertion which causes ICE
Signed-off-by: FedericoBruzzone <[email protected]>
1 parent c0a8ad1 commit 5a546aa

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

compiler/rustc_ty_utils/src/layout.rs

-5
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ fn map_error<'tcx>(
104104
// This is sometimes not a compile error if there are trivially false where clauses.
105105
// See `tests/ui/layout/trivial-bounds-sized.rs` for an example.
106106
assert!(field.layout.is_unsized(), "invalid layout error {err:#?}");
107-
if !field.ty.is_sized(cx.tcx(), cx.typing_env) {
108-
cx.tcx().dcx().delayed_bug(format!(
109-
"encountered unexpected unsized field in layout of {ty:?}: {field:#?}"
110-
));
111-
}
112107
if cx.tcx().features().trivial_bounds() {
113108
LayoutError::UnexpectedUnsized(ty)
114109
} else {

0 commit comments

Comments
 (0)