@@ -202,8 +202,8 @@ impl<T:Get> Get for Box<T> {
202
202
203
203
What happens when we invoke ` get_it(&Box::new(1_u16)) ` , for example? In this
204
204
case, the ` Self ` type is ` Box<u16> ` – that unifies with both impls,
205
- because the first applies to all types, and the second to all
206
- boxes . In order for this to be unambiguous, the compiler does a * winnowing*
205
+ because the first applies to all types ` T ` , and the second to all
206
+ ` Box<T> ` . In order for this to be unambiguous, the compiler does a * winnowing*
207
207
pass that considers ` where ` clauses
208
208
and attempts to remove candidates. In this case, the first impl only
209
209
applies if ` Box<u16> : Copy ` , which doesn't hold. After winnowing,
@@ -242,7 +242,7 @@ fn foo<X:A2+B>(x: X) {
242
242
243
243
In the body of ` foo ` , clearly we can use methods of ` A1 ` , ` A2 ` , or ` B `
244
244
on variable ` x ` . The line marked ` (*) ` will incur an obligation ` X: A1 ` ,
245
- which the line marked ` (#) ` will incur an obligation ` X: B ` . Meanwhile,
245
+ while the line marked ` (#) ` will incur an obligation ` X: B ` . Meanwhile,
246
246
the parameter environment will contain two where-clauses: ` X : A2 ` and ` X : B ` .
247
247
For each obligation, then, we search this list of where-clauses. The
248
248
obligation ` X: B ` trivially matches against the where-clause ` X: B ` .
0 commit comments