1
Fork 0

Fix a couple more DefKind discrepancies between DefKind::Closure and DefKind::SyntheticCoroutineBody

This commit is contained in:
Michael Goulet 2024-09-16 21:40:14 -04:00
parent af1ca7794a
commit 4beb1cf9e5
4 changed files with 44 additions and 3 deletions

View file

@ -287,7 +287,10 @@ impl DefKind {
#[inline]
pub fn is_fn_like(self) -> bool {
matches!(self, DefKind::Fn | DefKind::AssocFn | DefKind::Closure)
matches!(
self,
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::SyntheticCoroutineBody
)
}
/// Whether `query get_codegen_attrs` should be used with this definition.