Reject casts to unsized types

This closes issue #17441 and generally gives more helpful diagnostics.
But please add a check for &obj types.