From 1a5f32fcb516c1647c7581f21be9b11c8f1f94ba Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 24 Jan 2019 23:46:48 +0300 Subject: remove dead code --- crates/ra_hir/src/ids.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index 8cdc7ee56..7ed5dbec7 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs @@ -5,7 +5,7 @@ use ra_syntax::{TreeArc, SyntaxNode, SourceFile, AstNode, ast}; use ra_arena::{Arena, RawId, impl_arena_id}; use crate::{ - HirDatabase, Def, Crate, + HirDatabase, Def, Module, Trait, Type, Static, Const, }; @@ -284,16 +284,6 @@ impl DefId { let syntax = db.file_item(loc.source_item_id); (loc.source_item_id.file_id, syntax) } - - /// For a module, returns that module; for any other def, returns the containing module. - pub fn module(self, db: &impl HirDatabase) -> Module { - self.loc(db).module - } - - /// Returns the containing crate. - pub fn krate(&self, db: &impl HirDatabase) -> Option { - self.module(db).krate(db) - } } impl DefLoc { -- cgit v1.2.3