remove dead code
This commit is contained in:
parent
f3a37522a0
commit
1a5f32fcb5
@ -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<Crate> {
|
||||
self.module(db).krate(db)
|
||||
}
|
||||
}
|
||||
|
||||
impl DefLoc {
|
||||
|
Loading…
x
Reference in New Issue
Block a user