From 4f5f608b499ad50aa66b2213e3b92dd2fe61ed68 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Mon, 24 Aug 2020 20:26:45 +1200 Subject: Reorganise code --- crates/ra_ide_db/src/defs.rs | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'crates/ra_ide_db/src') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index 80c99935d..df56f2d9e 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -6,7 +6,6 @@ // FIXME: this badly needs rename/rewrite (matklad, 2020-02-06). use hir::{ - db::{DefDatabase, HirDatabase}, Field, HasVisibility, ImplDef, Local, MacroDef, Module, ModuleDef, Name, PathResolution, Semantics, TypeParam, Visibility, }; @@ -17,7 +16,6 @@ use ra_syntax::{ }; use crate::RootDatabase; -use ra_hir_def::resolver::{HasResolver, Resolver}; // FIXME: a more precise name would probably be `Symbol`? #[derive(Debug, PartialEq, Eq, Copy, Clone)] @@ -78,21 +76,6 @@ impl Definition { }; Some(name) } - - pub fn resolver(&self, db: &D) -> Option { - use hir::VariantDef; - use ra_hir_def::*; - Some(match self { - Definition::ModuleDef(def) => def.resolver(db)?, - Definition::Field(field) => { - Into::::into(Into::::into(field.parent_def(db))).resolver(db) - } - Definition::Macro(m) => Into::::into(m.module(db)?).resolver(db), - Definition::SelfType(imp) => Into::::into(imp.clone()).resolver(db), - Definition::Local(local) => Into::::into(local.parent(db)).resolver(db), - Definition::TypeParam(tp) => Into::::into(tp.module(db)).resolver(db), - }) - } } #[derive(Debug)] -- cgit v1.2.3