mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
More ids in Ty
This commit is contained in:
parent
ecd1204804
commit
3e32ac4f86
4 changed files with 13 additions and 17 deletions
|
@ -538,14 +538,6 @@ pub enum DefWithBody {
|
|||
impl_froms!(DefWithBody: Function, Const, Static);
|
||||
|
||||
impl DefWithBody {
|
||||
pub(crate) fn krate(self, db: &impl HirDatabase) -> Option<Crate> {
|
||||
match self {
|
||||
DefWithBody::Const(c) => c.krate(db),
|
||||
DefWithBody::Function(f) => f.krate(db),
|
||||
DefWithBody::Static(s) => s.krate(db),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn module(self, db: &impl HirDatabase) -> Module {
|
||||
match self {
|
||||
DefWithBody::Const(c) => c.module(db),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue