I would like to wait for a bit until we have a good story and coverage around -Zteach (at least on nightly). I think that's going to be more useful than always suggesting --explain E0XXX.
The old "--explain" suggestion system was a bit heavy. By rewording it, it might be better than what it was. However, -Zteach seems to be a potential great replacement in the future. I think that at first, we should put back --explain while waiting for -Zteach to be complete. What do you think about this?
I think it is reasonable to go that way. I don't know if there was any conversation before removal. I would be very much in favor of having a single note suggesting using --explain generically though. I wouldn't want to add 2 more lines per error with a code, it is redundant and would get old very quickly. It'd be even great if there were a way to silence it (which makes me go back to the increasing need of having a rustc.toml config file somewhere...).
I was thinking about just adding a line at the end of errors. Something like: "You got error(s), if you want more explanations about this/them, try with rustc --explain E0XXX" (XXX being one of the errors reported).
I like the idea of putting it as part of the final "here's how many errors you got" message.
I'll write a PR and we'll iterate about the formulation then.
Most helpful comment
I was thinking about just adding a line at the end of errors. Something like: "You got error(s), if you want more explanations about this/them, try with
rustc --explain E0XXX" (XXX being one of the errors reported).