Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes
This commit is contained in:
@@ -99,7 +99,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
|
||||
debug!("build_constraints_for_item({})", tcx.def_path_str(def_id));
|
||||
|
||||
// Skip items with no generics - there's nothing to infer in them.
|
||||
if tcx.generics_of(def_id).count() == 0 {
|
||||
if tcx.generics_of(def_id).is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user