Skip to content

Commit ddbdbc0

Browse files
committed
#[derive(Default)] struct FixupContext
1 parent 79a245b commit ddbdbc0

File tree

1 file changed

+3
-15
lines changed
  • compiler/rustc_ast_pretty/src/pprust/state

1 file changed

+3
-15
lines changed

Diff for: compiler/rustc_ast_pretty/src/pprust/state/fixup.rs

+3-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use rustc_ast::Expr;
22
use rustc_ast::util::{classify, parser};
33

4-
#[derive(Copy, Clone, Debug)]
4+
// The default amount of fixing is minimal fixing. Fixups should be turned on
5+
// in a targeted fashion where needed.
6+
#[derive(Copy, Clone, Debug, Default)]
57
pub(crate) struct FixupContext {
68
/// Print expression such that it can be parsed back as a statement
79
/// consisting of the original expression.
@@ -93,20 +95,6 @@ pub(crate) struct FixupContext {
9395
parenthesize_exterior_struct_lit: bool,
9496
}
9597

96-
/// The default amount of fixing is minimal fixing. Fixups should be turned on
97-
/// in a targeted fashion where needed.
98-
impl Default for FixupContext {
99-
fn default() -> Self {
100-
FixupContext {
101-
stmt: false,
102-
leftmost_subexpression_in_stmt: false,
103-
match_arm: false,
104-
leftmost_subexpression_in_match_arm: false,
105-
parenthesize_exterior_struct_lit: false,
106-
}
107-
}
108-
}
109-
11098
impl FixupContext {
11199
/// Create the initial fixup for printing an expression in statement
112100
/// position.

0 commit comments

Comments
 (0)