Skip to content

Commit

Permalink
trait_bound_spans -> sized_trait_bound_spans
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Mar 26, 2020
1 parent f1701dd commit b514c42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_trait_selection/traits/object_safety.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn object_safety_violations_for_trait(
violations
}

fn trait_bound_spans<'tcx>(
fn sized_trait_bound_spans<'tcx>(
tcx: TyCtxt<'tcx>,
bounds: hir::GenericBounds<'tcx>,
) -> impl 'tcx + Iterator<Item = Span> {
Expand Down Expand Up @@ -207,14 +207,14 @@ fn get_sized_bounds(tcx: TyCtxt<'_>, trait_def_id: DefId) -> SmallVec<[Span; 1]>
{
// Fetch spans for trait bounds that are Sized:
// `trait T where Self: Pred`
Some(trait_bound_spans(tcx, pred.bounds))
Some(sized_trait_bound_spans(tcx, pred.bounds))
}
_ => None,
}
})
.flatten()
// Fetch spans for supertraits that are `Sized`: `trait T: Super`.
.chain(trait_bound_spans(tcx, bounds))
.chain(sized_trait_bound_spans(tcx, bounds))
.collect::<SmallVec<[Span; 1]>>(),
),
_ => None,
Expand Down

0 comments on commit b514c42

Please sign in to comment.