]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/formats/item_type.rs
Auto merge of #106235 - compiler-errors:rework-bounds-collection, r=davidtwco
[rust.git] / src / librustdoc / formats / item_type.rs
index f21e60a64e0055f87060c44de8b5b492866deb66..2f1f4cbf3592457e7972dc043e04e6b86f27c3ae 100644 (file)
@@ -177,6 +177,9 @@ pub(crate) fn as_str(&self) -> &'static str {
             ItemType::TraitAlias => "traitalias",
         }
     }
+    pub(crate) fn is_method(&self) -> bool {
+        matches!(*self, ItemType::Method | ItemType::TyMethod)
+    }
 }
 
 impl fmt::Display for ItemType {