merge DefKind::Coroutine
into DefKind::Closure
This commit is contained in:
parent
274b5249eb
commit
f23befe6c1
27 changed files with 83 additions and 94 deletions
|
@ -373,10 +373,7 @@ fn add_unused_functions(cx: &CodegenCx<'_, '_>) {
|
|||
// just "functions", like consts, statics, etc. Filter those out.
|
||||
// If `ignore_unused_generics` was specified, filter out any
|
||||
// generic functions from consideration as well.
|
||||
if !matches!(
|
||||
kind,
|
||||
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Coroutine
|
||||
) {
|
||||
if !matches!(kind, DefKind::Fn | DefKind::AssocFn | DefKind::Closure) {
|
||||
return None;
|
||||
}
|
||||
if ignore_unused_generics && tcx.generics_of(def_id).requires_monomorphization(tcx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue