Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user