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.
Impl::all_in_module(…)
1 parent b8e83b7 commit 0cbee3bCopy full SHA for 0cbee3b
src/tools/rust-analyzer/crates/hir/src/lib.rs
@@ -3724,6 +3724,10 @@ impl Impl {
3724
inherent.all_impls().chain(trait_.all_impls()).map(Self::from).collect()
3725
}
3726
3727
+ pub fn all_in_module(db: &dyn HirDatabase, module: Module) -> Vec<Impl> {
3728
+ module.id.def_map(db.upcast())[module.id.local_id].scope.impls().map(Into::into).collect()
3729
+ }
3730
+
3731
pub fn all_for_type(db: &dyn HirDatabase, Type { ty, env }: Type) -> Vec<Impl> {
3732
let def_crates = match method_resolution::def_crates(db, &ty, env.krate) {
3733
Some(def_crates) => def_crates,
0 commit comments