]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_metadata/src/rmeta/decoder.rs
Rollup merge of #106767 - chbaker0:disable-unstable-features, r=Mark-Simulacrum
[rust.git] / compiler / rustc_metadata / src / rmeta / decoder.rs
index 99d8225a4c391381075f18b736bdb816771ffebe..44da3fbe300ca1cf4d4c167f1efb3c4a67df1e2c 100644 (file)
@@ -462,7 +462,7 @@ fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> SyntaxContext {
                 .root
                 .syntax_contexts
                 .get(cdata, id)
-                .unwrap_or_else(|| panic!("Missing SyntaxContext {:?} for crate {:?}", id, cname))
+                .unwrap_or_else(|| panic!("Missing SyntaxContext {id:?} for crate {cname:?}"))
                 .decode((cdata, sess))
         })
     }
@@ -806,7 +806,7 @@ fn get_span(self, index: DefIndex, sess: &Session) -> Span {
             .tables
             .def_span
             .get(self, index)
-            .unwrap_or_else(|| panic!("Missing span for {:?}", index))
+            .unwrap_or_else(|| panic!("Missing span for {index:?}"))
             .decode((self, sess))
     }
 
@@ -1249,7 +1249,7 @@ fn get_proc_macro_quoted_span(self, index: usize, sess: &Session) -> Span {
             .tables
             .proc_macro_quoted_spans
             .get(self, index)
-            .unwrap_or_else(|| panic!("Missing proc macro quoted span: {:?}", index))
+            .unwrap_or_else(|| panic!("Missing proc macro quoted span: {index:?}"))
             .decode((self, sess))
     }
 
@@ -1594,8 +1594,8 @@ fn get_generator_diagnostic_data(
             })
     }
 
-    fn get_may_have_doc_links(self, index: DefIndex) -> bool {
-        self.root.tables.may_have_doc_links.get(self, index).is_some()
+    fn get_attr_flags(self, index: DefIndex) -> AttrFlags {
+        self.root.tables.attr_flags.get(self, index).unwrap_or(AttrFlags::empty())
     }
 
     fn get_is_intrinsic(self, index: DefIndex) -> bool {