Remove unnecessary unboxed_closures feature usage
It has been possible to clone closures for a while now
This commit is contained in:
parent
59579907ab
commit
b4ed7114bd
2 changed files with 1 additions and 20 deletions
|
@ -10,9 +10,7 @@
|
||||||
#![feature(array_windows)]
|
#![feature(array_windows)]
|
||||||
#![feature(control_flow_enum)]
|
#![feature(control_flow_enum)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![feature(unboxed_closures)]
|
|
||||||
#![feature(generator_trait)]
|
#![feature(generator_trait)]
|
||||||
#![feature(fn_traits)]
|
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
#![feature(auto_traits)]
|
#![feature(auto_traits)]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
|
|
|
@ -597,7 +597,7 @@ impl<O: ForestObligation> ObligationForest<O> {
|
||||||
Some(rpos) => {
|
Some(rpos) => {
|
||||||
// Cycle detected.
|
// Cycle detected.
|
||||||
processor.process_backedge(
|
processor.process_backedge(
|
||||||
stack[rpos..].iter().map(GetObligation(&self.nodes)),
|
stack[rpos..].iter().map(|&i| &self.nodes[i].obligation),
|
||||||
PhantomData,
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue