Don't loop infinitely on 0-size structs in repr

Closes #7625
auto merge of #7683 : alexcrichton/rust/issue-7625, r=thestinger

Closes #7625