From d5b760ba62b40dd770c09e704b8a3af64c1fd058 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sat, 9 Jan 2021 12:00:45 -0500 Subject: Bump rustfmt version Also switches on formatting of the mir build module --- compiler/rustc_errors/src/snippet.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_errors/src/snippet.rs') 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(_) + ) } } -- cgit 1.4.1-3-g733a5