Skip to content

Commit

Permalink
Use terse form for Fn bound.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Oct 21, 2023
1 parent 547af00 commit 7ae1851
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions compiler/rustc_mir_dataflow/src/move_paths/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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.
///
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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))) => {
Expand Down

0 comments on commit 7ae1851

Please sign in to comment.