diff options
| author | csmoe <csmoe@msn.com> | 2019-09-21 03:17:57 +0000 |
|---|---|---|
| committer | csmoe <csmoe@msn.com> | 2019-09-21 03:17:57 +0000 |
| commit | a813cc1bf190f9cdcd7dce2eba287c637ce4048f (patch) | |
| tree | 4ef07df95341cd37db30d0edf139cc2e183fdb75 /src/librustc_metadata/decoder.rs | |
| parent | 9ffb1ce28cb1656d6142f1f9f6f882eb187fac25 (diff) | |
| download | rust-a813cc1bf190f9cdcd7dce2eba287c637ce4048f.tar.gz rust-a813cc1bf190f9cdcd7dce2eba287c637ce4048f.zip | |
rename is_async_fn to asyncness
Diffstat (limited to 'src/librustc_metadata/decoder.rs')
| -rw-r--r-- | src/librustc_metadata/decoder.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index 6cc5c409e13..5153564fc82 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -1208,13 +1208,12 @@ impl<'a, 'tcx> CrateMetadata { constness == hir::Constness::Const } - pub fn is_async_fn(&self, id: DefIndex) -> bool { - let asyncness = match self.entry(id).kind { + 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, _ => hir::IsAsync::NotAsync, - }; - asyncness == hir::IsAsync::Async + } } pub fn is_foreign_item(&self, id: DefIndex) -> bool { |
