diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-01-09 12:00:45 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-02-02 09:09:52 -0500 |
| commit | d5b760ba62b40dd770c09e704b8a3af64c1fd058 (patch) | |
| tree | e15b2809a9c9447c7cee05932f04cd4e9fd10792 /compiler/rustc_errors/src | |
| parent | f6cb45ad01a4518f615926f39801996622f46179 (diff) | |
| download | rust-d5b760ba62b40dd770c09e704b8a3af64c1fd058.tar.gz rust-d5b760ba62b40dd770c09e704b8a3af64c1fd058.zip | |
Bump rustfmt version
Also switches on formatting of the mir build module
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/snippet.rs | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index 37902dddff4..c09cce21bf2 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -36,7 +36,7 @@ macro_rules! forward_inner_docs { ($e:expr => $i:item) => { #[doc = $e] $i - } + }; } /// In general, the `DiagnosticBuilder` uses deref to allow access to 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(_) + ) } } |
