diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-10-21 12:09:02 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-10-21 12:09:02 +0000 |
| commit | 7ae1851803b6adb9c213f6051e705d2f7172ec92 (patch) | |
| tree | 182dcc17082001aa8df58e7e2c62c4fc30c4cbf5 /compiler/rustc_mir_dataflow/src/move_paths/builder.rs | |
| parent | 547af00019835556de2a5509fabc5bc880e6faca (diff) | |
| download | rust-7ae1851803b6adb9c213f6051e705d2f7172ec92.tar.gz rust-7ae1851803b6adb9c213f6051e705d2f7172ec92.zip | |
Use terse form for Fn bound.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/move_paths/builder.rs')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/builder.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs index f07e84b7c7f..ccf3dc7941f 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs @@ -20,10 +20,7 @@ struct MoveDataBuilder<'a, 'tcx, F> { filter: F, } -impl<'a, 'tcx, F> MoveDataBuilder<'a, 'tcx, F> -where - F: Fn(Ty<'tcx>) -> bool, -{ +impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> { fn new( body: &'a Body<'tcx>, tcx: TyCtxt<'tcx>, @@ -108,10 +105,7 @@ enum MovePathResult { Error, } -impl<'b, 'a, 'tcx, F> Gatherer<'b, 'a, 'tcx, F> -where - F: Fn(Ty<'tcx>) -> bool, -{ +impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> { /// This creates a MovePath for a given place, returning an `MovePathError` /// if that place can't be moved from. /// @@ -323,10 +317,7 @@ pub(super) fn gather_moves<'tcx>( builder.finalize() } -impl<'a, 'tcx, F> MoveDataBuilder<'a, 'tcx, F> -where - F: Fn(Ty<'tcx>) -> bool, -{ +impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> { fn gather_args(&mut self) { for arg in self.body.args_iter() { if let Some(path) = self.data.rev_lookup.find_local(arg) { @@ -359,10 +350,7 @@ struct Gatherer<'b, 'a, 'tcx, F> { loc: Location, } -impl<'b, 'a, 'tcx, F> Gatherer<'b, 'a, 'tcx, F> -where - F: Fn(Ty<'tcx>) -> bool, -{ +impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> { fn gather_statement(&mut self, stmt: &Statement<'tcx>) { match &stmt.kind { StatementKind::Assign(box (place, Rvalue::CopyForDeref(reffed))) => { |
