File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
librustc_trait_selection/traits Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -1302,7 +1302,7 @@ impl<'tcx> Predicate<'tcx> {
13021302 // from the substitution and the value being substituted into, and
13031303 // this trick achieves that).
13041304
1305- let substs = & trait_ref. skip_binder ( ) . substs ;
1305+ let substs = trait_ref. skip_binder ( ) . substs ;
13061306 let kind = self . kind ( ) ;
13071307 let new = match kind {
13081308 & PredicateKind :: Trait ( ref binder, constness) => {
@@ -1555,13 +1555,6 @@ impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<PolyTraitRef<'tcx>> {
15551555 }
15561556}
15571557
1558- impl < ' tcx > ToPredicate < ' tcx > for ConstnessAnd < & PolyTraitRef < ' tcx > > {
1559- fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1560- ty:: PredicateKind :: Trait ( self . value . to_poly_trait_predicate ( ) , self . constness )
1561- . to_predicate ( tcx)
1562- }
1563- }
1564-
15651558impl < ' tcx > ToPredicate < ' tcx > for PolyRegionOutlivesPredicate < ' tcx > {
15661559 fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
15671560 PredicateKind :: RegionOutlives ( self ) . to_predicate ( tcx)
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ impl<'tcx> TraitAliasExpansionInfo<'tcx> {
5959 ) ;
6060 }
6161
62- pub fn trait_ref ( & self ) -> & ty:: PolyTraitRef < ' tcx > {
63- & self . top ( ) . 0
62+ pub fn trait_ref ( & self ) -> ty:: PolyTraitRef < ' tcx > {
63+ self . top ( ) . 0
6464 }
6565
6666 pub fn top ( & self ) -> & ( ty:: PolyTraitRef < ' tcx > , Span ) {
@@ -109,7 +109,7 @@ impl<'tcx> TraitAliasExpander<'tcx> {
109109
110110 // Don't recurse if this trait alias is already on the stack for the DFS search.
111111 let anon_pred = anonymize_predicate ( tcx, pred) ;
112- if item. path . iter ( ) . rev ( ) . skip ( 1 ) . any ( |( tr, _) | {
112+ if item. path . iter ( ) . rev ( ) . skip ( 1 ) . any ( |& ( tr, _) | {
113113 anonymize_predicate ( tcx, tr. without_const ( ) . to_predicate ( tcx) ) == anon_pred
114114 } ) {
115115 return false ;
You can’t perform that action at this time.
0 commit comments