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> {
1302
1302
// from the substitution and the value being substituted into, and
1303
1303
// this trick achieves that).
1304
1304
1305
- let substs = & trait_ref. skip_binder ( ) . substs ;
1305
+ let substs = trait_ref. skip_binder ( ) . substs ;
1306
1306
let kind = self . kind ( ) ;
1307
1307
let new = match kind {
1308
1308
& PredicateKind :: Trait ( ref binder, constness) => {
@@ -1555,13 +1555,6 @@ impl<'tcx> ToPredicate<'tcx> for ConstnessAnd<PolyTraitRef<'tcx>> {
1555
1555
}
1556
1556
}
1557
1557
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
-
1565
1558
impl < ' tcx > ToPredicate < ' tcx > for PolyRegionOutlivesPredicate < ' tcx > {
1566
1559
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1567
1560
PredicateKind :: RegionOutlives ( self ) . to_predicate ( tcx)
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ impl<'tcx> TraitAliasExpansionInfo<'tcx> {
59
59
) ;
60
60
}
61
61
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
64
64
}
65
65
66
66
pub fn top ( & self ) -> & ( ty:: PolyTraitRef < ' tcx > , Span ) {
@@ -109,7 +109,7 @@ impl<'tcx> TraitAliasExpander<'tcx> {
109
109
110
110
// Don't recurse if this trait alias is already on the stack for the DFS search.
111
111
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, _) | {
113
113
anonymize_predicate ( tcx, tr. without_const ( ) . to_predicate ( tcx) ) == anon_pred
114
114
} ) {
115
115
return false ;
You can’t perform that action at this time.
0 commit comments