We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pub fn all_supertraits(…)
hir::Trait
1 parent 69437d1 commit 80df05bCopy full SHA for 80df05b
src/tools/rust-analyzer/crates/hir/src/lib.rs
@@ -2704,6 +2704,11 @@ impl Trait {
2704
db.trait_data(self.id).name.clone()
2705
}
2706
2707
+ pub fn all_supertraits(self, db: &dyn HirDatabase) -> Vec<Trait> {
2708
+ let traits = all_super_traits(db.upcast(), self.into());
2709
+ traits.iter().map(|tr| Trait::from(*tr)).collect()
2710
+ }
2711
+
2712
pub fn items(self, db: &dyn HirDatabase) -> Vec<AssocItem> {
2713
db.trait_data(self.id).items.iter().map(|(_name, it)| (*it).into()).collect()
2714
0 commit comments