diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-08 06:56:06 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-01-08 20:30:21 +0000 |
| commit | 82a22154815b70e5701064bef59d3334f5bc1cf7 (patch) | |
| tree | 40d6223ac17b8293ea29e1b2266817f56c56d75c /compiler/rustc_hir | |
| parent | dfb9f5df2c9f3c60f2541b3804cb6be1b5c66e63 (diff) | |
| download | rust-82a22154815b70e5701064bef59d3334f5bc1cf7.tar.gz rust-82a22154815b70e5701064bef59d3334f5bc1cf7.zip | |
Don't check for recursion in generator witness fields
Diffstat (limited to 'compiler/rustc_hir')
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index e88b876534e..cadf54c76a3 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1361,6 +1361,12 @@ impl CoroutineKind { } } +impl CoroutineKind { + pub fn is_fn_like(self) -> bool { + matches!(self, CoroutineKind::Desugared(_, CoroutineSource::Fn)) + } +} + impl fmt::Display for CoroutineKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { |
