Skip to content

Commit

Permalink
Change def_id filter to use requires_monomorphization()
Browse files Browse the repository at this point in the history
  • Loading branch information
richkadel committed Mar 23, 2021
1 parent 5a484a1 commit 94a3454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ fn add_unused_functions<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) {
.iter()
.filter_map(|local_def_id| {
let def_id = local_def_id.to_def_id();
if ignore_unused_generics && tcx.generics_of(def_id).count() > 0 {
if ignore_unused_generics && tcx.generics_of(def_id).requires_monomorphization(tcx) {
return None;
}
Some(local_def_id.to_def_id())
Expand Down

0 comments on commit 94a3454

Please sign in to comment.