1862: Assoc item resolution refactoring (again) r=flodiebold a=flodiebold

This is #1849, with the associated type selection code removed for now. Handling cycles there will need some more thought.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
This commit is contained in:
bors[bot] 2019-09-17 21:16:28 +00:00 committed by GitHub
commit 54379ec6f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 359 additions and 262 deletions

View file

@ -1,7 +1,7 @@
use std::{collections::HashSet, fmt::Write, path::Path, time::Instant};
use ra_db::SourceDatabase;
use ra_hir::{Crate, HasBodySource, HasSource, HirDisplay, ImplItem, ModuleDef, Ty, TypeWalk};
use ra_hir::{AssocItem, Crate, HasBodySource, HasSource, HirDisplay, ModuleDef, Ty, TypeWalk};
use ra_syntax::AstNode;
use crate::{Result, Verbosity};
@ -47,7 +47,7 @@ pub fn run(
for impl_block in module.impl_blocks(db) {
for item in impl_block.items(db) {
num_decls += 1;
if let ImplItem::Method(f) = item {
if let AssocItem::Function(f) = item {
funcs.push(f);
}
}