Convert a first batch of diagnostics to have error codes
auto merge of #15615 : jakub-/rust/diagnostics, r=brson