@@ -544,14 +544,14 @@ impl<'tcx> TyS<'tcx> {
544544 pub fn is_primitive_ty ( & self ) -> bool {
545545 match self . sty {
546546 TyKind :: Bool |
547- TyKind :: Char |
548- TyKind :: Int ( _) |
549- TyKind :: Uint ( _) |
550- TyKind :: Float ( _) |
551- TyKind :: Infer ( InferTy :: IntVar ( _) ) |
552- TyKind :: Infer ( InferTy :: FloatVar ( _) ) |
553- TyKind :: Infer ( InferTy :: FreshIntTy ( _) ) |
554- TyKind :: Infer ( InferTy :: FreshFloatTy ( _) ) => true ,
547+ TyKind :: Char |
548+ TyKind :: Int ( _) |
549+ TyKind :: Uint ( _) |
550+ TyKind :: Float ( _) |
551+ TyKind :: Infer ( InferTy :: IntVar ( _) ) |
552+ TyKind :: Infer ( InferTy :: FloatVar ( _) ) |
553+ TyKind :: Infer ( InferTy :: FreshIntTy ( _) ) |
554+ TyKind :: Infer ( InferTy :: FreshFloatTy ( _) ) => true ,
555555 TyKind :: Ref ( _, x, _) => x. is_primitive_ty ( ) ,
556556 _ => false ,
557557 }
@@ -1042,15 +1042,15 @@ impl<'a, 'gcx, 'tcx> GenericPredicates<'tcx> {
10421042
10431043#[ derive( Clone , Copy , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable ) ]
10441044pub enum Predicate < ' tcx > {
1045- /// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be
1045+ /// Corresponds to `where Foo: Bar<A,B,C>`. `Foo` here would be
10461046 /// the `Self` type of the trait reference and `A`, `B`, and `C`
10471047 /// would be the type parameters.
10481048 Trait ( PolyTraitPredicate < ' tcx > ) ,
10491049
1050- /// where `'a : 'b`
1050+ /// where `'a: 'b`
10511051 RegionOutlives ( PolyRegionOutlivesPredicate < ' tcx > ) ,
10521052
1053- /// where `T : 'a`
1053+ /// where `T: 'a`
10541054 TypeOutlives ( PolyTypeOutlivesPredicate < ' tcx > ) ,
10551055
10561056 /// where `<T as TraitRef>::Name == X`, approximately.
@@ -1063,7 +1063,7 @@ pub enum Predicate<'tcx> {
10631063 /// trait must be object-safe
10641064 ObjectSafe ( DefId ) ,
10651065
1066- /// No direct syntax. May be thought of as `where T : FnFoo<...>`
1066+ /// No direct syntax. May be thought of as `where T: FnFoo<...>`
10671067 /// for some substitutions `...` and `T` being a closure type.
10681068 /// Satisfied (or refuted) once we know the closure's kind.
10691069 ClosureKind ( DefId , ClosureSubsts < ' tcx > , ClosureKind ) ,
@@ -1112,11 +1112,11 @@ impl<'a, 'gcx, 'tcx> Predicate<'tcx> {
11121112 //
11131113 // Let's start with an easy case. Consider two traits:
11141114 //
1115- // trait Foo<'a> : Bar<'a,'a> { }
1115+ // trait Foo<'a>: Bar<'a,'a> { }
11161116 // trait Bar<'b,'c> { }
11171117 //
1118- // Now, if we have a trait reference `for<'x> T : Foo<'x>`, then
1119- // we can deduce that `for<'x> T : Bar<'x,'x>`. Basically, if we
1118+ // Now, if we have a trait reference `for<'x> T: Foo<'x>`, then
1119+ // we can deduce that `for<'x> T: Bar<'x,'x>`. Basically, if we
11201120 // knew that `Foo<'x>` (for any 'x) then we also know that
11211121 // `Bar<'x,'x>` (for any 'x). This more-or-less falls out from
11221122 // normal substitution.
@@ -1129,21 +1129,21 @@ impl<'a, 'gcx, 'tcx> Predicate<'tcx> {
11291129 //
11301130 // Another example to be careful of is this:
11311131 //
1132- // trait Foo1<'a> : for<'b> Bar1<'a,'b> { }
1132+ // trait Foo1<'a>: for<'b> Bar1<'a,'b> { }
11331133 // trait Bar1<'b,'c> { }
11341134 //
1135- // Here, if we have `for<'x> T : Foo1<'x>`, then what do we know?
1136- // The answer is that we know `for<'x,'b> T : Bar1<'x,'b>`. The
1135+ // Here, if we have `for<'x> T: Foo1<'x>`, then what do we know?
1136+ // The answer is that we know `for<'x,'b> T: Bar1<'x,'b>`. The
11371137 // reason is similar to the previous example: any impl of
1138- // `T:Foo1<'x>` must show that `for<'b> T : Bar1<'x, 'b>`. So
1138+ // `T:Foo1<'x>` must show that `for<'b> T: Bar1<'x, 'b>`. So
11391139 // basically we would want to collapse the bound lifetimes from
11401140 // the input (`trait_ref`) and the supertraits.
11411141 //
11421142 // To achieve this in practice is fairly straightforward. Let's
11431143 // consider the more complicated scenario:
11441144 //
1145- // - We start out with `for<'x> T : Foo1<'x>`. In this case, `'x`
1146- // has a De Bruijn index of 1. We want to produce `for<'x,'b> T : Bar1<'x,'b>`,
1145+ // - We start out with `for<'x> T: Foo1<'x>`. In this case, `'x`
1146+ // has a De Bruijn index of 1. We want to produce `for<'x,'b> T: Bar1<'x,'b>`,
11471147 // where both `'x` and `'b` would have a DB index of 1.
11481148 // The substitution from the input trait-ref is therefore going to be
11491149 // `'a => 'x` (where `'x` has a DB index of 1).
@@ -1219,7 +1219,7 @@ impl<'tcx> PolyTraitPredicate<'tcx> {
12191219}
12201220
12211221#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , Debug , RustcEncodable , RustcDecodable ) ]
1222- pub struct OutlivesPredicate < A , B > ( pub A , pub B ) ; // `A : B`
1222+ pub struct OutlivesPredicate < A , B > ( pub A , pub B ) ; // `A: B`
12231223pub type PolyOutlivesPredicate < A , B > = ty:: Binder < OutlivesPredicate < A , B > > ;
12241224pub type RegionOutlivesPredicate < ' tcx > = OutlivesPredicate < ty:: Region < ' tcx > ,
12251225 ty:: Region < ' tcx > > ;
@@ -2476,7 +2476,7 @@ impl<'tcx> TyS<'tcx> {
24762476 ///
24772477 /// Note: prefer `ty.walk()` where possible.
24782478 pub fn maybe_walk < F > ( & ' tcx self , mut f : F )
2479- where F : FnMut ( Ty < ' tcx > ) -> bool
2479+ where F : FnMut ( Ty < ' tcx > ) -> bool
24802480 {
24812481 let mut walker = self . walk ( ) ;
24822482 while let Some ( ty) = walker. next ( ) {
0 commit comments