Skip to content

Commit

Permalink
Remove wrong assertion which causes ICE
Browse files Browse the repository at this point in the history
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
  • Loading branch information
FedericoBruzzone committed Jan 6, 2025
1 parent c584d16 commit 6d48c1a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions compiler/rustc_ty_utils/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ fn map_error<'tcx>(
// This is sometimes not a compile error if there are trivially false where clauses.
// See `tests/ui/layout/trivial-bounds-sized.rs` for an example.
assert!(field.layout.is_unsized(), "invalid layout error {err:#?}");
if !field.ty.is_sized(cx.tcx(), cx.typing_env) {
cx.tcx().dcx().delayed_bug(format!(
"encountered unexpected unsized field in layout of {ty:?}: {field:#?}"
));
}
if cx.tcx().features().trivial_bounds() {
LayoutError::UnexpectedUnsized(ty)
} else {
Expand Down

0 comments on commit 6d48c1a

Please sign in to comment.