rustc: Make CrateStore private to TyCtxt#44420
Conversation
|
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
src/librustc/ty/context.rs
Outdated
There was a problem hiding this comment.
Oh, right, we can do this now! @nikomatsakis do you think we should move to this style more uniformly?
src/librustc_metadata/cstore_impl.rs
Outdated
There was a problem hiding this comment.
I was worried about this but I think it's fine - this will eventually be just a byte buffer that the query system interprets.
|
My only concern here is that the |
michaelwoerister
left a comment
There was a problem hiding this comment.
Thanks, @alexcrichton!
r=me with that comment added and the remaining RustDoc build errors fixed.
src/librustc/ty/context.rs
Outdated
There was a problem hiding this comment.
Ideally this would only be visible to the query system since it allows untracked access to crate store contents. Maybe you could add a comment "Do not use this unless you also provide proper dependency tracking" or something.
src/librustc/ty/context.rs
Outdated
There was a problem hiding this comment.
I'm not sure that metadata encoding even needs to be a method of CrateStore. It seems rather independent. But that's for another PR, I'd say.
At least for some of the cases, yes. |
77b51c5 to
8b9f84c
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit 8b9f84c has been approved by |
|
☔ The latest upstream changes (presumably #44418) made this pull request unmergeable. Please resolve the merge conflicts. |
8b9f84c to
224d47d
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit 224d47d has been approved by |
|
@bors rollup |
…aelwoerister rustc: Make `CrateStore` private to `TyCtxt` This commit makes the `CrateStore` object private to the `ty/context.rs` module and also absent on the `Session` itself. cc rust-lang#44390 cc rust-lang#44341 (initial commit pulled and rebased from here)
…aelwoerister rustc: Make `CrateStore` private to `TyCtxt` This commit makes the `CrateStore` object private to the `ty/context.rs` module and also absent on the `Session` itself. cc rust-lang#44390 cc rust-lang#44341 (initial commit pulled and rebased from here)
224d47d to
6e834ac
Compare
6e834ac to
e283efa
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit e283efa has been approved by |
|
@bors: rollup- |
|
☔ The latest upstream changes (presumably #44275) made this pull request unmergeable. Please resolve the merge conflicts. |
…ulating CrateStore access in tcx.
e283efa to
a4b6a97
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit a4b6a97 has been approved by |
|
💔 Test failed - status-appveyor |
This commit removes the `cstore_untracked` method, making the `CrateStore` trait object entirely private to the `ty/context.rs` module.
a4b6a97 to
921750b
Compare
|
@bors: r=michaelwoerister |
|
📌 Commit 921750b has been approved by |
|
☀️ Test successful - status-appveyor, status-travis |
|
🎉 |
This commit makes the
CrateStoreobject private to thety/context.rsmodule and also absent on theSessionitself.cc #44390
cc #44341 (initial commit pulled and rebased from here)