Skip to content

Commit 8e451da

Browse files
committed
w
1 parent 8bef065 commit 8e451da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/solve/candidate-preference.md

Lines changed: 2 additions & 1 deletion
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. For trait goals this is only relevant 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. This is only useful for where-bounds which use `'static`:
171171

172172
```rust
173173
trait A {
@@ -181,6 +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.
184185

185186
There are no known issues from preferring impls over global where-bounds.
186187

0 commit comments

Comments
 (0)