mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
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
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user