constness == hir::Constness::Const
}
+ pub fn asyncness(&self, id: DefIndex) -> hir::IsAsync {
+ match self.entry(id).kind {
+ EntryKind::Fn(data) => data.decode(self).asyncness,
+ EntryKind::Method(data) => data.decode(self).fn_data.asyncness,
+ EntryKind::ForeignFn(data) => data.decode(self).asyncness,
+ _ => bug!("asyncness: expect functions entry."),
+ }
+ }
+
pub fn is_foreign_item(&self, id: DefIndex) -> bool {
match self.entry(id).kind {
EntryKind::ForeignImmStatic |