-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass TyCtxt
to early diagostics decoration
#134339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this seems reasonable. I have some suggestions regarding the lifetime names (random 'a
, 'b
and 'c
are really confusing).
51263a3
to
291c519
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, r=me once PR CI is green.
@bors r=jieyouxu rollup |
Rollup of 4 pull requests Successful merges: - rust-lang#134111 (Fix `--nocapture` for run-make tests) - rust-lang#134329 (Add m68k_target_feature) - rust-lang#134331 (bootstrap: make ./x test error-index work) - rust-lang#134339 (Pass `TyCtxt` to early diagostics decoration) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134339 - Urgau:tcx-in-early-diag, r=jieyouxu Pass `TyCtxt` to early diagostics decoration 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 rust-lang#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`
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 withtcx.crate_name(...)
.I highly recommend reviewing this PR commit by commit.
r? @jieyouxu