Pass TyCtxt to early diagostics decoration by Urgau · Pull Request #134339 · rust-lang/rust (original) (raw)

This PR pass a TyCtxt to the early diagnostics decoration code so that diagnostics code that take advantage of (a very limited but still useful) TyCtxt in their note, help, suggestions, ...

This is particulary useful for #133221 which wants to get the crate name of a DefId, which is possible with tcx.crate_name(...).

I highly recommend reviewing this PR commit by commit.

r? @jieyouxu