Skip to content

Commit

Permalink
fix assertion - trait object pointers don't have infinite fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Aug 8, 2017
1 parent bcd75d6 commit 6c0f2aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/ty/layout.rs
Expand Up @@ -2197,8 +2197,8 @@ impl<'a, 'tcx> TyLayout<'tcx> {
let tcx = cx.tcx();

let ptr_field_type = |pointee: Ty<'tcx>| {
assert!(i < 2);
let slice = |element: Ty<'tcx>| {
assert!(i < 2);
if i == 0 {
tcx.mk_mut_ptr(element)
} else {
Expand Down

0 comments on commit 6c0f2aa

Please sign in to comment.