1
Fork 0

Point out if a local trait has no implementations

This commit is contained in:
Michael Goulet 2023-09-10 03:33:07 +00:00
parent 26f4b72724
commit 30e6cea0ae
63 changed files with 658 additions and 6 deletions

View file

@ -90,6 +90,10 @@ pub struct TraitImpls {
}
impl TraitImpls {
pub fn is_empty(&self) -> bool {
self.blanket_impls.is_empty() && self.non_blanket_impls.is_empty()
}
pub fn blanket_impls(&self) -> &[DefId] {
self.blanket_impls.as_slice()
}