]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_span/src/lib.rs
Auto merge of #79073 - davidtwco:issue-78957-const-param-attrs, r=lcnr
[rust.git] / compiler / rustc_span / src / lib.rs
index 11a49d1ab887daf91c8deb2fc64992f44816b1eb..f63a73acbf4ba164c5130eaaa41e9e015f3be718 100644 (file)
@@ -1015,10 +1015,7 @@ pub enum ExternalSourceKind {
 
 impl ExternalSource {
     pub fn is_absent(&self) -> bool {
-        match self {
-            ExternalSource::Foreign { kind: ExternalSourceKind::Present(_), .. } => false,
-            _ => true,
-        }
+        !matches!(self, ExternalSource::Foreign { kind: ExternalSourceKind::Present(_), .. })
     }
 
     pub fn get_source(&self) -> Option<&Lrc<String>> {