Skip to content

Commit 18238c7

Browse files
Rollup merge of rust-lang#43741 - Gankro:fix-assert, r=eddyb
fix assertion - trait object pointers don't have infinite fields r? @eddyb
2 parents 6047e93 + 6c0f2aa commit 18238c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/ty/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2197,8 +2197,8 @@ impl<'a, 'tcx> TyLayout<'tcx> {
21972197
let tcx = cx.tcx();
21982198

21992199
let ptr_field_type = |pointee: Ty<'tcx>| {
2200+
assert!(i < 2);
22002201
let slice = |element: Ty<'tcx>| {
2201-
assert!(i < 2);
22022202
if i == 0 {
22032203
tcx.mk_mut_ptr(element)
22042204
} else {

0 commit comments

Comments
 (0)