Skip to content

Commit c4cc0a8

Browse files
committed
Fix some typographical errors
Thanks to zachs18 and andresovela for some of these.
1 parent 57892c5 commit c4cc0a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/0000-supertrait-item-shadowing-v2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ use itertools::Itertools as _;
3030

3131
fn foo() -> impl Iterator<Item = &'static str> {
3232
"1,2,3".split(",").intersperse("|")
33-
// ^ This is ambiguious: it could refer to Iterator::intersperse or Itertools::intersperse
33+
// ^ This is ambiguous: it could refer to Iterator::intersperse or Itertools::intersperse
3434
}
3535
```
3636

37-
This code actually works today because `intersperse` is an unstable API, which works because the compiler already has [logic](https://github.com/rust-lang/rust/pull/48552) to prefer stable methods over unstable methods when an amiguity occurs.
37+
This code actually works today because `intersperse` is an unstable API, which works because the compiler already has [logic](https://github.com/rust-lang/rust/pull/48552) to prefer stable methods over unstable methods when an ambiguity occurs.
3838

3939
Attempts to stabilize `intersperse` have failed with a large number of regressions [reported by crater](https://github.com/rust-lang/rust/issues/88967) which affect many popular crates. Even if these were to be manually corrected (since ambiguity is considered allowed breakage) we would have to go through this whole process again every time a method from `itertools` is uplifted to the standard library.
4040

@@ -73,7 +73,7 @@ Today that example will give an ambiguity error because `method` is provided by
7373
# Drawbacks
7474
[drawbacks]: #drawbacks
7575

76-
This behavior can be surprising: adding a method to a sub-trait can change which function is called in unrelated code. This is mitigated by the which warns users about the potential ambiguity.
76+
This behavior can be surprising: adding a method to a sub-trait can change which function is called in unrelated code. This is mitigated by the lint which warns users about the potential ambiguity.
7777

7878
# Rationale and alternatives
7979
[rationale-and-alternatives]: #rationale-and-alternatives
@@ -138,7 +138,7 @@ Resolving in favor of `a` is a breaking change; in favor of `b` is not. The only
138138
### RFC 2845
139139

140140
RFC 2845 was a previous attempt to address this problem, but it has several drawbacks:
141-
- It doesn't fully address the problem since it only changes name resolution when trait methods are resolved due to generic bounds. In practice, most of the amiguity from stabilizing `intersperse` comes from non-generic code.
141+
- It doesn't fully address the problem since it only changes name resolution when trait methods are resolved due to generic bounds. In practice, most of the ambiguity from stabilizing `intersperse` comes from non-generic code.
142142
- It adds a lot of complexity because name resolution depends on the specific trait bounds that have been brought into scope.
143143

144144
# Unresolved questions

0 commit comments

Comments
 (0)