Skip to content

Commit

Permalink
Move FixupContext's Copy and Clone impls to handwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 18, 2024
1 parent 1e02144 commit d9f0c81
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/fixup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::classify;
use crate::expr::Expr;
use crate::precedence::Precedence;

#[derive(Copy, Clone)]
pub(crate) struct FixupContext {
// Print expression such that it can be parsed back as a statement
// consisting of the original expression.
Expand Down Expand Up @@ -213,3 +212,11 @@ impl FixupContext {
|| Precedence::of_rhs(expr) <= Precedence::And
}
}

impl Copy for FixupContext {}

impl Clone for FixupContext {
fn clone(&self) -> Self {
*self
}
}

0 comments on commit d9f0c81

Please sign in to comment.