Use terse form for Fn bound.
This commit is contained in:
parent
547af00019
commit
7ae1851803
1 changed files with 4 additions and 16 deletions
|
@ -20,10 +20,7 @@ struct MoveDataBuilder<'a, 'tcx, F> {
|
||||||
filter: F,
|
filter: F,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx, F> MoveDataBuilder<'a, 'tcx, F>
|
impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
|
||||||
where
|
|
||||||
F: Fn(Ty<'tcx>) -> bool,
|
|
||||||
{
|
|
||||||
fn new(
|
fn new(
|
||||||
body: &'a Body<'tcx>,
|
body: &'a Body<'tcx>,
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
|
@ -108,10 +105,7 @@ enum MovePathResult {
|
||||||
Error,
|
Error,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'b, 'a, 'tcx, F> Gatherer<'b, 'a, 'tcx, F>
|
impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> {
|
||||||
where
|
|
||||||
F: Fn(Ty<'tcx>) -> bool,
|
|
||||||
{
|
|
||||||
/// This creates a MovePath for a given place, returning an `MovePathError`
|
/// This creates a MovePath for a given place, returning an `MovePathError`
|
||||||
/// if that place can't be moved from.
|
/// if that place can't be moved from.
|
||||||
///
|
///
|
||||||
|
@ -323,10 +317,7 @@ pub(super) fn gather_moves<'tcx>(
|
||||||
builder.finalize()
|
builder.finalize()
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx, F> MoveDataBuilder<'a, 'tcx, F>
|
impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
|
||||||
where
|
|
||||||
F: Fn(Ty<'tcx>) -> bool,
|
|
||||||
{
|
|
||||||
fn gather_args(&mut self) {
|
fn gather_args(&mut self) {
|
||||||
for arg in self.body.args_iter() {
|
for arg in self.body.args_iter() {
|
||||||
if let Some(path) = self.data.rev_lookup.find_local(arg) {
|
if let Some(path) = self.data.rev_lookup.find_local(arg) {
|
||||||
|
@ -359,10 +350,7 @@ struct Gatherer<'b, 'a, 'tcx, F> {
|
||||||
loc: Location,
|
loc: Location,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'b, 'a, 'tcx, F> Gatherer<'b, 'a, 'tcx, F>
|
impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> {
|
||||||
where
|
|
||||||
F: Fn(Ty<'tcx>) -> bool,
|
|
||||||
{
|
|
||||||
fn gather_statement(&mut self, stmt: &Statement<'tcx>) {
|
fn gather_statement(&mut self, stmt: &Statement<'tcx>) {
|
||||||
match &stmt.kind {
|
match &stmt.kind {
|
||||||
StatementKind::Assign(box (place, Rvalue::CopyForDeref(reffed))) => {
|
StatementKind::Assign(box (place, Rvalue::CopyForDeref(reffed))) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue