Skip to content

Commit 483aba7

Browse files
committed
Fix typo
1 parent 41b7a72 commit 483aba7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

text/0000-cmp-ops-reform.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,12 @@ In addition, this RFC proposes another trait, `IndexSet`, that is used for `expr
313313
```rust
314314
pub trait IndexSet<Idx> {
315315
type Val;
316-
fn index_mut<'a>(&'a mut self, index: Idx, val: Val);
316+
fn index_set<'a>(&'a mut self, index: Idx, val: Val);
317317
}
318318
```
319319

320+
(This idea is borrowed from [@sfackler's earlier RFC](https://github.com/rust-lang/rfcs/pull/159/files).)
321+
320322
The motivation for this trait is cases like `map["key"] = val`, which
321323
should correspond to an *insertion* rather than a mutable lookup. With
322324
today's setup, that expression would result in a panic if "key" was

0 commit comments

Comments
 (0)