Slightly improved rustc error messages for invalid -C arguments

Closes #17587.