Avoid accessing HIR from MIR queries.
This commit is contained in:
parent
341883d051
commit
db03a2deb0
10 changed files with 35 additions and 41 deletions
|
@ -223,6 +223,14 @@ impl DefKind {
|
|||
| DefKind::Impl => None,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_fn_like(self) -> bool {
|
||||
match self {
|
||||
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Generator => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The resolution of a path or export.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue