We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0a8ad1 commit 5a546aaCopy full SHA for 5a546aa
compiler/rustc_ty_utils/src/layout.rs
@@ -104,11 +104,6 @@ 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) {
108
- cx.tcx().dcx().delayed_bug(format!(
109
- "encountered unexpected unsized field in layout of {ty:?}: {field:#?}"
110
- ));
111
- }
112
if cx.tcx().features().trivial_bounds() {
113
LayoutError::UnexpectedUnsized(ty)
114
} else {
0 commit comments