Make emitting an error necessary to acquire a ErrorReported token (original) (raw)

ErrorReported indicates that a compiler error has been emitted, but currently it may be freely constructed. We should make it unconstructable, so that the only way to get one is to .emit() an error.

cc #68434 (comment) @eddyb @estebank