Skip to content

Commit

Permalink
Enable rustc_pass_by_value for Span
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Feb 25, 2022
1 parent 5723946 commit de1ac37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ fn rewrite_struct_lit<'a>(
enum StructLitField<'a> {
Regular(&'a ast::ExprField),
Base(&'a ast::Expr),
Rest(&'a Span),
Rest(Span),
}

// 2 = " {".len()
Expand Down Expand Up @@ -1568,7 +1568,7 @@ fn rewrite_struct_lit<'a>(
let field_iter = fields.iter().map(StructLitField::Regular).chain(
match struct_rest {
ast::StructRest::Base(expr) => Some(StructLitField::Base(&**expr)),
ast::StructRest::Rest(span) => Some(StructLitField::Rest(span)),
ast::StructRest::Rest(span) => Some(StructLitField::Rest(*span)),
ast::StructRest::None => None,
}
.into_iter(),
Expand Down

0 comments on commit de1ac37

Please sign in to comment.