diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2016-08-24 06:49:44 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2016-09-06 11:17:03 -0400 |
| commit | 5415b34ca6077b45a241c51ef2a227993a644d26 (patch) | |
| tree | d48d90cf42b73464cefcd77fcd7e9211a52cc822 /src/test/run-pass/thinlto | |
| parent | 5114f8a29ba29c7a168b46ede82fb62d67a2d619 (diff) | |
| download | rust-5415b34ca6077b45a241c51ef2a227993a644d26.tar.gz rust-5415b34ca6077b45a241c51ef2a227993a644d26.zip | |
write to inherent_impls during the visitor
The goal here is to avoid writing to the `inherent_impls` map from within the general `Coherence` task, and instead write to it as we visit. Writing to it from the Coherence task is actually an information leak; it happened to be safe because Coherence read from `DepNode::Krate`, but that was very coarse. I removed the `Rc` here because, upon manual inspection, nobody clones the data in this table, and it meant that we can accumulate the data in place. That said, the pattern that is used for the inherent impls map is *generally* an anti-pattern (that is, holding the borrow lock for the duration of using the contents), so it'd probably be better to clone (and I doubt that would be expensive -- how many inherent impls does a typical type have?).
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
