rust/src/librustc_resolve
Aaron Turon 5fe0bb743a Future-proof indexing on maps: remove IndexMut
This commit removes the `IndexMut` impls on `HashMap` and `BTreeMap`, in
order to future-proof the API against the eventual inclusion of an
`IndexSet` trait.

Ideally, we would eventually be able to support:

```rust
map[owned_key] = val;
map[borrowed_key].mutating_method(arguments);
&mut map[borrowed_key];
```

but to keep the design space as unconstrained as possible, we do not
currently want to support `IndexMut`, in case some other strategy will
eventually be needed.

Code currently using mutating index notation can use `get_mut` instead.

[breaking-change]

Closes #23448
2015-03-20 10:46:31 -07:00
..
build_reduced_graph.rs Reviewer changes 2015-03-16 17:01:12 +13:00
check_unused.rs rustc: combine partial_def_map and last_private_map into def_map. 2015-02-24 14:16:02 +02:00
diagnostics.rs Error if pub use references a private item. 2015-03-16 11:03:54 +13:00
lib.rs Future-proof indexing on maps: remove IndexMut 2015-03-20 10:46:31 -07:00
record_exports.rs resolve: factor out resolve imports to its own module 2015-03-16 11:03:54 +13:00
resolve_imports.rs Future-proof indexing on maps: remove IndexMut 2015-03-20 10:46:31 -07:00