1
Fork 0

Handle empty where-clause better

This commit is contained in:
Michael Goulet 2022-06-05 17:37:45 -07:00
parent 8506b7d4e0
commit 9c47afe9fa
23 changed files with 78 additions and 59 deletions

View file

@ -2293,7 +2293,8 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitOutlivesRequirements {
// If all predicates are inferable, drop the entire clause
// (including the `where`)
if hir_generics.has_where_clause && dropped_predicate_count == num_predicates {
if hir_generics.has_where_clause_predicates && dropped_predicate_count == num_predicates
{
let where_span = hir_generics
.where_clause_span()
.expect("span of (nonempty) where clause should exist");