Skip to content

Commit 7ae1851

Browse files
committed
Use terse form for Fn bound.
1 parent 547af00 commit 7ae1851

File tree

1 file changed

+4
-16
lines changed
  • compiler/rustc_mir_dataflow/src/move_paths

1 file changed

+4
-16
lines changed

Diff for: compiler/rustc_mir_dataflow/src/move_paths/builder.rs

+4-16
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ struct MoveDataBuilder<'a, 'tcx, F> {
2020
filter: F,
2121
}
2222

23-
impl<'a, 'tcx, F> MoveDataBuilder<'a, 'tcx, F>
24-
where
25-
F: Fn(Ty<'tcx>) -> bool,
26-
{
23+
impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
2724
fn new(
2825
body: &'a Body<'tcx>,
2926
tcx: TyCtxt<'tcx>,
@@ -108,10 +105,7 @@ enum MovePathResult {
108105
Error,
109106
}
110107

111-
impl<'b, 'a, 'tcx, F> Gatherer<'b, 'a, 'tcx, F>
112-
where
113-
F: Fn(Ty<'tcx>) -> bool,
114-
{
108+
impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> {
115109
/// This creates a MovePath for a given place, returning an `MovePathError`
116110
/// if that place can't be moved from.
117111
///
@@ -323,10 +317,7 @@ pub(super) fn gather_moves<'tcx>(
323317
builder.finalize()
324318
}
325319

326-
impl<'a, 'tcx, F> MoveDataBuilder<'a, 'tcx, F>
327-
where
328-
F: Fn(Ty<'tcx>) -> bool,
329-
{
320+
impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
330321
fn gather_args(&mut self) {
331322
for arg in self.body.args_iter() {
332323
if let Some(path) = self.data.rev_lookup.find_local(arg) {
@@ -359,10 +350,7 @@ struct Gatherer<'b, 'a, 'tcx, F> {
359350
loc: Location,
360351
}
361352

362-
impl<'b, 'a, 'tcx, F> Gatherer<'b, 'a, 'tcx, F>
363-
where
364-
F: Fn(Ty<'tcx>) -> bool,
365-
{
353+
impl<'b, 'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> Gatherer<'b, 'a, 'tcx, F> {
366354
fn gather_statement(&mut self, stmt: &Statement<'tcx>) {
367355
match &stmt.kind {
368356
StatementKind::Assign(box (place, Rvalue::CopyForDeref(reffed))) => {

0 commit comments

Comments
 (0)