repr: add support for trait objects

Closes #8916
repr: handle tuple structs sanely

Closes #8919