There is no file named compiler/rustc_typeck/src/diagnostics.rs. I ran into this while trying to add a new error code: all diagnostics are now in compiler/rustc_error_codes/src/error_codes.rs, which has one very long register_diagnostics!, and nowhere else adds error codes. register_long_diagnostics! also seems to no longer exist, instead that file uses include_str!("./error_codes/E0XXX.md").
Originally posted by @jyn514 in #838 (comment)