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-04 04:50:36 +0000
committerbors <bors@rust-lang.org>2021-06-04 04:50:36 +0000
commit4afa3a80926f52aa361fe4e89643dac2e2e57f34 (patch)
treec0693324bfe3de1c7c5465330e084cd7ccffd85f /compiler/rustc_data_structures/src
parent1c82bb293c83877b52380d0d7a181a011fb70603 (diff)
parentedb8f653e768361eb6191b5bbe2f31087394d79d (diff)
downloadrust-4afa3a80926f52aa361fe4e89643dac2e2e57f34.tar.gz
rust-4afa3a80926f52aa361fe4e89643dac2e2e57f34.zip
Auto merge of #85984 - JohnTitor:rollup-rq0g9ph, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #85717 (Document `From` impls for cow.rs)
 - #85850 (Remove unused feature gates)
 - #85888 (Fix typo in internal documentation for `TrustedRandomAccess`)
 - #85889 (Restoring the `num_def_ids` function in the CStore API )
 - #85899 (jsondocck small cleanup)
 - #85937 (Fix bad suggestions for code from proc_macro)
 - #85963 (Show `::{{constructor}}` in std::any::type_name().)
 - #85977 (Fix linkcheck script from getting out of sync.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/lib.rs3
-rw-r--r--compiler/rustc_data_structures/src/obligation_forest/mod.rs19
2 files changed, 1 insertions, 21 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs
index adbb98fa750..a8b9f479f1e 100644
--- a/compiler/rustc_data_structures/src/lib.rs
+++ b/compiler/rustc_data_structures/src/lib.rs
@@ -10,15 +10,12 @@
 #![feature(array_windows)]
 #![feature(control_flow_enum)]
 #![feature(in_band_lifetimes)]
-#![feature(unboxed_closures)]
 #![feature(generator_trait)]
-#![feature(fn_traits)]
 #![feature(min_specialization)]
 #![feature(auto_traits)]
 #![feature(nll)]
 #![feature(allow_internal_unstable)]
 #![feature(hash_raw_entry)]
-#![feature(stmt_expr_attributes)]
 #![feature(core_intrinsics)]
 #![feature(test)]
 #![feature(associated_type_bounds)]
diff --git a/compiler/rustc_data_structures/src/obligation_forest/mod.rs b/compiler/rustc_data_structures/src/obligation_forest/mod.rs
index 29d685ab530..3aabe94bfc6 100644
--- a/compiler/rustc_data_structures/src/obligation_forest/mod.rs
+++ b/compiler/rustc_data_structures/src/obligation_forest/mod.rs
@@ -597,7 +597,7 @@ impl<O: ForestObligation> ObligationForest<O> {
                 Some(rpos) => {
                     // Cycle detected.
                     processor.process_backedge(
-                        stack[rpos..].iter().map(GetObligation(&self.nodes)),
+                        stack[rpos..].iter().map(|&i| &self.nodes[i].obligation),
                         PhantomData,
                     );
                 }
@@ -705,20 +705,3 @@ impl<O: ForestObligation> ObligationForest<O> {
         });
     }
 }
-
-// I need a Clone closure.
-#[derive(Clone)]
-struct GetObligation<'a, O>(&'a [Node<O>]);
-
-impl<'a, 'b, O> FnOnce<(&'b usize,)> for GetObligation<'a, O> {
-    type Output = &'a O;
-    extern "rust-call" fn call_once(self, args: (&'b usize,)) -> &'a O {
-        &self.0[*args.0].obligation
-    }
-}
-
-impl<'a, 'b, O> FnMut<(&'b usize,)> for GetObligation<'a, O> {
-    extern "rust-call" fn call_mut(&mut self, args: (&'b usize,)) -> &'a O {
-        &self.0[*args.0].obligation
-    }
-}