summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_ast_pretty/src/pprust/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ast_pretty/src/pprust/state.rs')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs
index 694d688bf..849336c86 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -686,7 +686,7 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
fn bclose_maybe_open(&mut self, span: rustc_span::Span, empty: bool, close_box: bool) {
let has_comment = self.maybe_print_comment(span.hi());
if !empty || has_comment {
- self.break_offset_if_not_bol(1, -(INDENT_UNIT as isize));
+ self.break_offset_if_not_bol(1, -INDENT_UNIT);
}
self.word("}");
if close_box {
@@ -984,7 +984,9 @@ impl<'a> State<'a> {
pub fn print_assoc_constraint(&mut self, constraint: &ast::AssocConstraint) {
self.print_ident(constraint.ident);
- constraint.gen_args.as_ref().map(|args| self.print_generic_args(args, false));
+ if let Some(args) = constraint.gen_args.as_ref() {
+ self.print_generic_args(args, false)
+ }
self.space();
match &constraint.kind {
ast::AssocConstraintKind::Equality { term } => {