@@ -78,10 +78,10 @@ pub type ProjectionTyObligation<'tcx> =
78
78
/// When attempting to resolve `<T as TraitRef>::Name` ...
79
79
#[ derive( Debug ) ]
80
80
pub enum ProjectionTyError < ' tcx > {
81
- /// ...we found multiple sources of information and couldn't resolve the ambiguity.
81
+ /// ... we found multiple sources of information and couldn't resolve the ambiguity.
82
82
TooManyCandidates ,
83
83
84
- /// ...an error occurred matching `T : TraitRef`
84
+ /// ... an error occurred matching `T: TraitRef`.
85
85
TraitSelectionError ( SelectionError < ' tcx > ) ,
86
86
}
87
87
@@ -92,13 +92,13 @@ pub struct MismatchedProjectionTypes<'tcx> {
92
92
93
93
#[ derive( PartialEq , Eq , Debug ) ]
94
94
enum ProjectionTyCandidate < ' tcx > {
95
- // from a where-clause in the env or object type
95
+ // From a where-clause in the env or object type.
96
96
ParamEnv ( ty:: PolyProjectionPredicate < ' tcx > ) ,
97
97
98
- // from the definition of `Trait` when you have something like <<A as Trait>::B as Trait2>::C
98
+ // From the definition of `Trait` when you have something like ` <<A as Trait>::B as Trait2>::C`.
99
99
TraitDef ( ty:: PolyProjectionPredicate < ' tcx > ) ,
100
100
101
- // from a "impl" (or a "pseudo-impl" returned by select)
101
+ // From a "impl" (or a "pseudo-impl" returned by select).
102
102
Select ( Selection < ' tcx > ) ,
103
103
}
104
104
@@ -270,7 +270,7 @@ pub fn normalize<'a, 'b, 'gcx, 'tcx, T>(selcx: &'a mut SelectionContext<'b, 'gcx
270
270
cause : ObligationCause < ' tcx > ,
271
271
value : & T )
272
272
-> Normalized < ' tcx , T >
273
- where T : TypeFoldable < ' tcx >
273
+ where T : TypeFoldable < ' tcx >
274
274
{
275
275
normalize_with_depth ( selcx, param_env, cause, 0 , value)
276
276
}
@@ -284,7 +284,7 @@ pub fn normalize_with_depth<'a, 'b, 'gcx, 'tcx, T>(
284
284
value : & T )
285
285
-> Normalized < ' tcx , T >
286
286
287
- where T : TypeFoldable < ' tcx >
287
+ where T : TypeFoldable < ' tcx >
288
288
{
289
289
debug ! ( "normalize_with_depth(depth={}, value={:?})" , depth, value) ;
290
290
let mut normalizer = AssociatedTypeNormalizer :: new ( selcx, param_env, cause, depth) ;
@@ -386,7 +386,7 @@ impl<'a, 'b, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for AssociatedTypeNormalizer<'a,
386
386
// handle normalization within binders because
387
387
// otherwise we wind up a need to normalize when doing
388
388
// trait matching (since you can have a trait
389
- // obligation like `for<'a> T::B : Fn(&'a int)`), but
389
+ // obligation like `for<'a> T::B: Fn(&'a int)`), but
390
390
// we can't normalize with bound regions in scope. So
391
391
// far now we just ignore binders but only normalize
392
392
// if all bound regions are gone (and then we still
@@ -948,7 +948,7 @@ fn assemble_candidates_from_param_env<'cx, 'gcx, 'tcx>(
948
948
///
949
949
/// ```
950
950
/// trait Foo {
951
- /// type FooT : Bar<BarT= i32>
951
+ /// type FooT: Bar<BarT = i32>
952
952
/// }
953
953
/// ```
954
954
///
@@ -1139,8 +1139,8 @@ fn assemble_candidates_from_impls<'cx, 'gcx, 'tcx>(
1139
1139
// fn foo<T:SomeTrait>(...) { }
1140
1140
// ```
1141
1141
//
1142
- // If the user writes `<T as SomeTrait>::Foo`, then the `T
1143
- // : SomeTrait` binding does not help us decide what the
1142
+ // If the user writes `<T as SomeTrait>::Foo`, then the
1143
+ // `T : SomeTrait` binding does not help us decide what the
1144
1144
// type `Foo` is (at least, not more specifically than
1145
1145
// what we already knew).
1146
1146
//
@@ -1150,10 +1150,10 @@ fn assemble_candidates_from_impls<'cx, 'gcx, 'tcx>(
1150
1150
// fn bar<T:SomeTrait<Foo=usize>>(...) { ... }
1151
1151
// ```
1152
1152
//
1153
- // Doesn't the `T : Sometrait<Foo= usize>` predicate help
1153
+ // Doesn't the `T: Sometrait<Foo = usize>` predicate help
1154
1154
// resolve `T::Foo`? And of course it does, but in fact
1155
1155
// that single predicate is desugared into two predicates
1156
- // in the compiler: a trait predicate (`T : SomeTrait`) and a
1156
+ // in the compiler: a trait predicate (`T: SomeTrait`) and a
1157
1157
// projection. And the projection where clause is handled
1158
1158
// in `assemble_candidates_from_param_env`.
1159
1159
false
0 commit comments