about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-02-02 14:52:53 +0000
committerbors <bors@rust-lang.org>2021-02-02 14:52:53 +0000
commitb81f5811f96fe750ab28c15219d1b0dba6b1dc90 (patch)
treede4308cb542bc90db1f8bfb1bdc1d28b6478b4ab /compiler/rustc_errors/src/snippet.rs
parenta3ed564c130ec3f19e933a9ea31faca5a717ce91 (diff)
parentd5b760ba62b40dd770c09e704b8a3af64c1fd058 (diff)
downloadrust-b81f5811f96fe750ab28c15219d1b0dba6b1dc90.tar.gz
rust-b81f5811f96fe750ab28c15219d1b0dba6b1dc90.zip
Auto merge of #80843 - Mark-Simulacrum:fmt-bump, r=petrochenkov
Bump rustfmt version
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
-rw-r--r--compiler/rustc_errors/src/snippet.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler/rustc_errors/src/snippet.rs b/compiler/rustc_errors/src/snippet.rs
index dbb2523f286..acb88e57db5 100644
--- a/compiler/rustc_errors/src/snippet.rs
+++ b/compiler/rustc_errors/src/snippet.rs
@@ -122,11 +122,13 @@ impl Annotation {
     }
 
     pub fn is_multiline(&self) -> bool {
-        matches!(self.annotation_type,
+        matches!(
+            self.annotation_type,
             AnnotationType::Multiline(_)
-            | AnnotationType::MultilineStart(_)
-            | AnnotationType::MultilineLine(_)
-            | AnnotationType::MultilineEnd(_))
+                | AnnotationType::MultilineStart(_)
+                | AnnotationType::MultilineLine(_)
+                | AnnotationType::MultilineEnd(_)
+        )
     }
 
     pub fn len(&self) -> usize {
@@ -158,7 +160,10 @@ impl Annotation {
 
     pub fn takes_space(&self) -> bool {
         // Multiline annotations always have to keep vertical space.
-        matches!(self.annotation_type, AnnotationType::MultilineStart(_) | AnnotationType::MultilineEnd(_))
+        matches!(
+            self.annotation_type,
+            AnnotationType::MultilineStart(_) | AnnotationType::MultilineEnd(_)
+        )
     }
 }