Fix a couple more DefKind discrepancies between DefKind::Closure and DefKind::SyntheticCoroutineBody
This commit is contained in:
parent
af1ca7794a
commit
4beb1cf9e5
4 changed files with 44 additions and 3 deletions
|
@ -24,7 +24,7 @@ fn cross_crate_inlinable(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
|
|||
|
||||
// This just reproduces the logic from Instance::requires_inline.
|
||||
match tcx.def_kind(def_id) {
|
||||
DefKind::Ctor(..) | DefKind::Closure => return true,
|
||||
DefKind::Ctor(..) | DefKind::Closure | DefKind::SyntheticCoroutineBody => return true,
|
||||
DefKind::Fn | DefKind::AssocFn => {}
|
||||
_ => return false,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue