Change def_id filter to use requires_monomorphization()
Per @wesleywiser's comment: https://github.com/rust-lang/rust/pull/83307#discussion_r599223342
This commit is contained in:
parent
5a484a1aed
commit
94a3454b03
1 changed files with 1 additions and 1 deletions
|
@ -269,7 +269,7 @@ fn add_unused_functions<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) {
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|local_def_id| {
|
.filter_map(|local_def_id| {
|
||||||
let def_id = local_def_id.to_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;
|
return None;
|
||||||
}
|
}
|
||||||
Some(local_def_id.to_def_id())
|
Some(local_def_id.to_def_id())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue