Skip to content

Commit 377ba7f

Browse files
committed
w
1 parent 8e451da commit 377ba7f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/solve/candidate-preference.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ where
167167

168168
#### Why no preference for global where-bounds
169169

170-
Global where-bounds are either fully implied by an impl or unsatisfiable. If they are unsatisfiable, we don't really care what happens. If a where-bound is fully implied then using the impl to prove the trait goal cannot result in additional constraints. This is only useful for where-bounds which use `'static`:
170+
Global where-bounds are either fully implied by an impl or unsatisfiable. If they are unsatisfiable, we don't really care what happens. If a where-bound is fully implied then using the impl to prove the trait goal cannot result in additional constraints. For trait goals this is only useful for where-bounds which use `'static`:
171171

172172
```rust
173173
trait A {
@@ -181,9 +181,7 @@ where
181181
x.test();
182182
}
183183
```
184-
More importantly, by using impls to prove goals also proven by a global where-bound, we do not consider impls to be shadowed when normalizing associated types.
185-
186-
There are no known issues from preferring impls over global where-bounds.
184+
More importantly, by using impls here we prevent global where-bounds from shadowing impls when normalizing associated types. There are no known issues from preferring impls over global where-bounds.
187185

188186
#### Why still consider global where-bounds
189187

0 commit comments

Comments
 (0)