1
Fork 0

Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes

This commit is contained in:
Santiago Pastorino 2024-05-11 11:46:25 +02:00
parent 84b9b6d16c
commit 4501ae89f1
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
18 changed files with 25 additions and 17 deletions

View file

@ -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();
}