Skip to content

Commit 121bbef

Browse files
authored
Merge pull request #2710 from jonas-schievink/rfc-2532-typo
Fix typos in RFC 2532
2 parents de0917d + 72a109b commit 121bbef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

text/2532-associated-type-defaults.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The following points were also noted in [RFC 192], but we expand upon them here:
4141
```rust
4242
trait Arbitrary: Sized + fmt::Debug {
4343
type Parameters: Default = ();
44-
44+
4545
fn arbitrary_with(args: Self::Parameters) -> Self::Strategy;
4646

4747
fn arbitrary() -> Self::Strategy {
@@ -68,7 +68,7 @@ The following points were also noted in [RFC 192], but we expand upon them here:
6868
```rust
6969
trait Arbitrary: Sized + fmt::Debug {
7070
fn arbitrary() -> Self::Strategy;
71-
71+
7272
type Strategy: Strategy<Value = Self>;
7373
}
7474
```
@@ -89,7 +89,7 @@ The following points were also noted in [RFC 192], but we expand upon them here:
8989
```rust
9090
trait Arbitrary: Sized + fmt::Debug {
9191
type Parameters: Default = ();
92-
92+
9393
fn arbitrary() -> Self::Strategy {
9494
Self::arbitrary_with(Default::default())
9595
}
@@ -258,7 +258,7 @@ impl<T> Foo for Vec<T> {
258258
In the current implementation, (6) is rejected because the compiler will not
259259
let you assume that `x` is of type `usize`. But in this proposal, you would be
260260
allowed to assume this. To permit this is not a problem because `Foo for Vec<T>`
261-
is not further specializable since `baz` in the implementation has not been
261+
is not further specializable since `Bar` in the implementation has not been
262262
marked as `default`.
263263

264264
### Trait objects
@@ -351,7 +351,7 @@ in other items specified in the implementation.
351351
If an implementation does make the associated type available for
352352
further specialization, then other definitions in the implementation
353353
may not assume the given underlying specified type of the associated type
354-
and may only assume that it is `Self::TheAsociatedType`.
354+
and may only assume that it is `Self::TheAssociatedType`.
355355

356356
This applies generally to any item inside a `trait`.
357357
You may only assume the signature of an item, but not any provided definition,
@@ -971,10 +971,10 @@ associated type include:
971971
/// "Callbacks" for a push-based parser
972972
trait Sink {
973973
fn handle_foo(&mut self, ...);
974-
974+
975975
default {
976976
type Output = Self;
977-
977+
978978
// OK to assume what `Output` really is because any overriding
979979
// must override both `Outout` and `finish`.
980980
fn finish(self) -> Self::Output { self }
@@ -1115,7 +1115,7 @@ impl ComputerScientist for StephanieWeirich {
11151115
// ERROR! You must override Details.
11161116
}
11171117

1118-
impl ComputerScientist for AndreiSabelfeld {
1118+
impl ComputerScientist for AndreiSabelfeld {
11191119
type Details = LangSec;
11201120
const THE_DETAILS: Self::Details = LangSec { papers: 90 };
11211121
fn papers(details: Self::Details) -> u8 { details.papers }

0 commit comments

Comments
 (0)