-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve comments on TyCtxt
and GlobalCtxt
.
#112190
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
Improve comments on TyCtxt
and GlobalCtxt
.
#112190
Conversation
a345315
to
66f1265
Compare
@bors rollup=always |
@@ -472,12 +472,7 @@ impl<'tcx> TyCtxtFeed<'tcx, LocalDefId> { | |||
} | |||
} | |||
|
|||
/// The central data structure of the compiler. It stores references |
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.
Hm, I feel like GlobalContext
is a bit of an implementation detail unless you're working on the query system.
At the least, this should link via a doc comment to GlobalCtxt
so people can click to see the more useful doc comment on that instead. Ideally, though, this should explain that the arenas and queries are accessible via TyCtxt
as well.
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.
I moved the comment back to TyCtxt
and tweaked it accordingly.
66f1265
to
c625880
Compare
@bors r+ rollup |
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#111670 (Require that const param tys implement `ConstParamTy`) - rust-lang#111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…) - rust-lang#112030 (Migrate `item_trait_alias` to Askama) - rust-lang#112150 (Support 128-bit atomics on all x86_64 Apple targets) - rust-lang#112174 (Fix broken link) - rust-lang#112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.) - rust-lang#112193 (Check tuple elements are `Sized` in `offset_of`) Failed merges: - rust-lang#112071 (Group rfcs tests) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#111670 (Require that const param tys implement `ConstParamTy`) - rust-lang#111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…) - rust-lang#112030 (Migrate `item_trait_alias` to Askama) - rust-lang#112150 (Support 128-bit atomics on all x86_64 Apple targets) - rust-lang#112174 (Fix broken link) - rust-lang#112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.) - rust-lang#112193 (Check tuple elements are `Sized` in `offset_of`) Failed merges: - rust-lang#112071 (Group rfcs tests) r? `@ghost` `@rustbot` modify labels: rollup
By adding some non-obvious information that took me a little while to figure out.
r? @compiler-errors