From b514c42e7baad3dec7dcce9e734df2e0b402391e Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 26 Mar 2020 09:59:07 +0100 Subject: [PATCH] trait_bound_spans -> sized_trait_bound_spans --- src/librustc_trait_selection/traits/object_safety.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_trait_selection/traits/object_safety.rs b/src/librustc_trait_selection/traits/object_safety.rs index ebeb0e968b0a..7d4ad61902a9 100644 --- a/src/librustc_trait_selection/traits/object_safety.rs +++ b/src/librustc_trait_selection/traits/object_safety.rs @@ -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 { @@ -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::>(), ), _ => None,