@@ -1873,7 +1873,7 @@ impl BuiltinBounds {
18731873 self_ty : Ty < ' tcx > ) -> Vec < Predicate < ' tcx > > {
18741874 self . iter ( ) . filter_map ( |builtin_bound|
18751875 match traits:: trait_ref_for_builtin_bound ( tcx, builtin_bound, self_ty) {
1876- Ok ( trait_ref) => Some ( trait_ref. as_predicate ( ) ) ,
1876+ Ok ( trait_ref) => Some ( trait_ref. to_predicate ( ) ) ,
18771877 Err ( ErrorReported ) => { None }
18781878 }
18791879 ) . collect ( )
@@ -2390,12 +2390,12 @@ impl<'tcx> ToPolyTraitRef<'tcx> for PolyProjectionPredicate<'tcx> {
23902390 }
23912391}
23922392
2393- pub trait AsPredicate < ' tcx > {
2394- fn as_predicate ( & self ) -> Predicate < ' tcx > ;
2393+ pub trait ToPredicate < ' tcx > {
2394+ fn to_predicate ( & self ) -> Predicate < ' tcx > ;
23952395}
23962396
2397- impl < ' tcx > AsPredicate < ' tcx > for TraitRef < ' tcx > {
2398- fn as_predicate ( & self ) -> Predicate < ' tcx > {
2397+ impl < ' tcx > ToPredicate < ' tcx > for TraitRef < ' tcx > {
2398+ fn to_predicate ( & self ) -> Predicate < ' tcx > {
23992399 // we're about to add a binder, so let's check that we don't
24002400 // accidentally capture anything, or else that might be some
24012401 // weird debruijn accounting.
@@ -2407,32 +2407,32 @@ impl<'tcx> AsPredicate<'tcx> for TraitRef<'tcx> {
24072407 }
24082408}
24092409
2410- impl < ' tcx > AsPredicate < ' tcx > for PolyTraitRef < ' tcx > {
2411- fn as_predicate ( & self ) -> Predicate < ' tcx > {
2410+ impl < ' tcx > ToPredicate < ' tcx > for PolyTraitRef < ' tcx > {
2411+ fn to_predicate ( & self ) -> Predicate < ' tcx > {
24122412 ty:: Predicate :: Trait ( self . to_poly_trait_predicate ( ) )
24132413 }
24142414}
24152415
2416- impl < ' tcx > AsPredicate < ' tcx > for PolyEquatePredicate < ' tcx > {
2417- fn as_predicate ( & self ) -> Predicate < ' tcx > {
2416+ impl < ' tcx > ToPredicate < ' tcx > for PolyEquatePredicate < ' tcx > {
2417+ fn to_predicate ( & self ) -> Predicate < ' tcx > {
24182418 Predicate :: Equate ( self . clone ( ) )
24192419 }
24202420}
24212421
2422- impl < ' tcx > AsPredicate < ' tcx > for PolyRegionOutlivesPredicate {
2423- fn as_predicate ( & self ) -> Predicate < ' tcx > {
2422+ impl < ' tcx > ToPredicate < ' tcx > for PolyRegionOutlivesPredicate {
2423+ fn to_predicate ( & self ) -> Predicate < ' tcx > {
24242424 Predicate :: RegionOutlives ( self . clone ( ) )
24252425 }
24262426}
24272427
2428- impl < ' tcx > AsPredicate < ' tcx > for PolyTypeOutlivesPredicate < ' tcx > {
2429- fn as_predicate ( & self ) -> Predicate < ' tcx > {
2428+ impl < ' tcx > ToPredicate < ' tcx > for PolyTypeOutlivesPredicate < ' tcx > {
2429+ fn to_predicate ( & self ) -> Predicate < ' tcx > {
24302430 Predicate :: TypeOutlives ( self . clone ( ) )
24312431 }
24322432}
24332433
2434- impl < ' tcx > AsPredicate < ' tcx > for PolyProjectionPredicate < ' tcx > {
2435- fn as_predicate ( & self ) -> Predicate < ' tcx > {
2434+ impl < ' tcx > ToPredicate < ' tcx > for PolyProjectionPredicate < ' tcx > {
2435+ fn to_predicate ( & self ) -> Predicate < ' tcx > {
24362436 Predicate :: Projection ( self . clone ( ) )
24372437 }
24382438}
0 commit comments