Skip to content

Commit 94a3454

Browse files
committed
Change def_id filter to use requires_monomorphization()
Per @wesleywiser's comment: #83307 (comment)
1 parent 5a484a1 commit 94a3454

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_codegen_llvm/src/coverageinfo

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ fn add_unused_functions<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) {
269269
.iter()
270270
.filter_map(|local_def_id| {
271271
let def_id = local_def_id.to_def_id();
272-
if ignore_unused_generics && tcx.generics_of(def_id).count() > 0 {
272+
if ignore_unused_generics && tcx.generics_of(def_id).requires_monomorphization(tcx) {
273273
return None;
274274
}
275275
Some(local_def_id.to_def_id())

0 commit comments

Comments
 (0)