mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Remove old impls infrastructure
This commit is contained in:
parent
ea3540c1a8
commit
b21829f7ed
15 changed files with 181 additions and 358 deletions
|
@ -82,14 +82,8 @@ impl FromSource for TypeAlias {
|
|||
impl FromSource for ImplBlock {
|
||||
type Ast = ast::ImplBlock;
|
||||
fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> {
|
||||
let module_src = crate::ModuleSource::from_child_node(
|
||||
db,
|
||||
src.file_id.original_file(db),
|
||||
&src.ast.syntax(),
|
||||
);
|
||||
let module = Module::from_definition(db, Source { file_id: src.file_id, ast: module_src })?;
|
||||
let impls = module.impl_blocks(db);
|
||||
impls.into_iter().find(|b| b.source(db) == src)
|
||||
let id = from_source(db, src)?;
|
||||
Some(ImplBlock { id })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue