diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2024-05-11 11:46:25 +0200 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2024-05-19 11:10:56 -0300 |
| commit | 4501ae89f1a442df66e0aeb8f864045d46a98d79 (patch) | |
| tree | a0d1bf8bf9af187c6120644f93af16c499bd77d9 /compiler/rustc_monomorphize/src/polymorphize.rs | |
| parent | 84b9b6d16c9328fa495743638f664f80a7379795 (diff) | |
| download | rust-4501ae89f1a442df66e0aeb8f864045d46a98d79.tar.gz rust-4501ae89f1a442df66e0aeb8f864045d46a98d79.zip | |
Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes
Diffstat (limited to 'compiler/rustc_monomorphize/src/polymorphize.rs')
| -rw-r--r-- | compiler/rustc_monomorphize/src/polymorphize.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/polymorphize.rs b/compiler/rustc_monomorphize/src/polymorphize.rs index 6487169d173..14ebe27ac23 100644 --- a/compiler/rustc_monomorphize/src/polymorphize.rs +++ b/compiler/rustc_monomorphize/src/polymorphize.rs @@ -51,7 +51,7 @@ fn unused_generic_params<'tcx>( debug!(?generics); // Exit early when there are no parameters to be unused. - if generics.count() == 0 { + if generics.is_empty() { return UnusedGenericParams::new_all_used(); } |
