Skip to content
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

docs: Edit rustc_middle::ty::query::on_disk_cache #80204

Merged
merged 1 commit into from
Dec 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/query/on_disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ impl<'sess> OnDiskCache<'sess> {

//- DECODING -------------------------------------------------------------------

/// A decoder that can read from the incr. comp. cache. It is similar to the one
/// A decoder that can read from the incremental compilation cache. It is similar to the one
/// we use for crate metadata decoding in that it can rebase spans and eventually
/// will also handle things that contain `Ty` instances.
crate struct CacheDecoder<'a, 'tcx> {
Expand Down Expand Up @@ -936,7 +936,7 @@ impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for &'tcx [Span] {

//- ENCODING -------------------------------------------------------------------

/// An encoder that can write the incr. comp. cache.
/// An encoder that can write to the incremental compilation cache.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Does the CacheEncoder write to an existing cache, or does it create a new one each time? If it creates a new cache, I think we'll want to leave out the word "to".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the cache is represented by OnDiskCache, so this is fine.

struct CacheEncoder<'a, 'tcx, E: OpaqueEncoder> {
tcx: TyCtxt<'tcx>,
encoder: &'a mut E,
Expand Down