about summary refs log tree commit diff
path: root/compiler/rustc_ast_pretty
diff options
context:
space:
mode:
authorKivooeo <Kivooeo123@gmail.com>2025-07-26 06:21:22 +0500
committerKivooeo <Kivooeo123@gmail.com>2025-07-28 06:08:48 +0500
commit43725ed819c57b86b32a66c40572246b1f5b8952 (patch)
tree52149f83843b22ea6b0e039662a1a7348ce360e5 /compiler/rustc_ast_pretty
parenta955f1cd09a027363729ceed919952d09f76f28e (diff)
downloadrust-43725ed819c57b86b32a66c40572246b1f5b8952.tar.gz
rust-43725ed819c57b86b32a66c40572246b1f5b8952.zip
use let chains in ast, borrowck, codegen, const_eval
Diffstat (limited to 'compiler/rustc_ast_pretty')
-rw-r--r--compiler/rustc_ast_pretty/src/pprust/state.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state.rs b/compiler/rustc_ast_pretty/src/pprust/state.rs
index def0cb74d29..f0cf0c1487f 100644
--- a/compiler/rustc_ast_pretty/src/pprust/state.rs
+++ b/compiler/rustc_ast_pretty/src/pprust/state.rs
@@ -572,10 +572,10 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
     }
 
     fn maybe_print_trailing_comment(&mut self, span: rustc_span::Span, next_pos: Option<BytePos>) {
-        if let Some(cmnts) = self.comments_mut() {
-            if let Some(cmnt) = cmnts.trailing_comment(span, next_pos) {
-                self.print_comment(cmnt);
-            }
+        if let Some(cmnts) = self.comments_mut()
+            && let Some(cmnt) = cmnts.trailing_comment(span, next_pos)
+        {
+            self.print_comment(cmnt);
         }
     }