We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e72a99a commit 2cd159dCopy full SHA for 2cd159d
compiler/rustc_query_system/src/dep_graph/serialized.rs
@@ -204,6 +204,8 @@ impl SerializedDepGraph {
204
.map(|&n| UnhashMap::with_capacity_and_hasher(n, Default::default()))
205
.collect();
206
207
+ // Use a single loop to build indices for all kinds, unlike `setup_index` which builds
208
+ // a single index for each loop over the nodes.
209
for (idx, node) in self.nodes.iter_enumerated() {
210
index[node.kind.as_usize()].insert(node.hash, idx);
211
}
@@ -220,7 +222,9 @@ impl SerializedDepGraph {
220
222
let client = jobserver::client();
221
223
// This should ideally use `try_acquire` to avoid races on the tokens,
224
// but the jobserver crate doesn't support that operation.
- if let Ok(true) = client.available().map(|tokens| tokens > 0) {
225
+ if let Ok(tokens) = client.available()
226
+ && tokens > 0
227
+ {
228
let this = self.clone();
229
thread::spawn(move || {
230
let _token = client.acquire();
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments