about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-06-06 11:31:16 +0000
committerbors <bors@rust-lang.org>2021-06-06 11:31:16 +0000
commitf57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1 (patch)
tree9bc36b15565d83984822ad38b4d9604e1e09e8af /compiler/rustc_data_structures/src
parent3740ba2a7dd965ca45db500ebf7ad580a7812c07 (diff)
parent19433c44bde0dd6ed674bd03f1cefbfc2f95c676 (diff)
downloadrust-f57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1.tar.gz
rust-f57d5ba3c9ffef4cd2402e3e7d8934bd1a6e9cc1.zip
Auto merge of #86054 - JohnTitor:rollup-j40z7sm, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #85436 (Avoid cloning cache key)
 - #85772 (Preserve metadata w/ Solaris-like linkers.)
 - #85920 (Tweak wasm_base target spec to indicate linker is not GNU and update linker inferring logic for wasm-ld.)
 - #85930 (Update standard library for IntoIterator implementation of arrays )
 - #85972 (Rustdoc html fixes)
 - #86028 (Drop an `if let` that will always succeed)
 - #86043 (don't clone attrs)
 - #86047 (Don't fire `invalid_doc_attributes` on `extern crate` items)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/obligation_forest/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/obligation_forest/mod.rs b/compiler/rustc_data_structures/src/obligation_forest/mod.rs
index 3aabe94bfc6..05b1a85381f 100644
--- a/compiler/rustc_data_structures/src/obligation_forest/mod.rs
+++ b/compiler/rustc_data_structures/src/obligation_forest/mod.rs
@@ -342,7 +342,7 @@ impl<O: ForestObligation> ObligationForest<O> {
             return Ok(());
         }
 
-        match self.active_cache.entry(cache_key.clone()) {
+        match self.active_cache.entry(cache_key) {
             Entry::Occupied(o) => {
                 let node = &mut self.nodes[*o.get()];
                 if let Some(parent_index) = parent {
@@ -366,8 +366,7 @@ impl<O: ForestObligation> ObligationForest<O> {
                     && self
                         .error_cache
                         .get(&obligation_tree_id)
-                        .map(|errors| errors.contains(&cache_key))
-                        .unwrap_or(false);
+                        .map_or(false, |errors| errors.contains(v.key()));
 
                 if already_failed {
                     Err(())