Uh oh!
There was an error while loading. Please reload this page.
Future-proof indexing on maps: remove IndexMut - #23559
Conversation
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] Closesrust-lang#23448
aturon
commented
Mar 20, 2015
Note that I did not remove from |
There was a problem hiding this comment.
Oof, I dunno if we'll be able to accurately reproduce such complex functionality.
Gankra
commented
Mar 20, 2015
@bors r+ |
bors
commented
Mar 20, 2015
📌 Commit 5fe0bb7 has been approved by |
bors
commented
Mar 21, 2015
⌛ Testing commit 5fe0bb7 with merge 7740b61... |
bors
commented
Mar 21, 2015
💔 Test failed - auto-win-32-opt |
alexcrichton
commented
Mar 21, 2015
@bors: retry On Sat, Mar 21, 2015 at 6:05 AM, bors notifications@github.com wrote:
|
…nkro 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] Closesrust-lang#23448 r? @gankro
bors
commented
Mar 21, 2015
⚡ Previous build results for auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-64-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-mac-32-opt, auto-win-32-nopt-t, auto-win-32-opt, auto-win-64-nopt-t... |
bors
commented
Mar 21, 2015
💔 Test failed - auto-mac-32-opt |
alexcrichton
commented
Mar 22, 2015
@bors: retry On Sat, Mar 21, 2015 at 4:10 PM, bors notifications@github.com wrote:
|
bors
commented
Mar 22, 2015
⌛ Testing commit 5fe0bb7 with merge c6a0865... |
…nkro 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] Closesrust-lang#23448 r? @gankro
bors
commented
Mar 23, 2015
💔 Test failed - auto-linux-32-nopt-t |
aturon
commented
Mar 23, 2015
@bors: retry |
This feature was removed in rust-lang/rust#23559.
This commit removes the
IndexMutimpls onHashMapandBTreeMap, inorder to future-proof the API against the eventual inclusion of an
IndexSettrait.Ideally, we would eventually be able to support:
but to keep the design space as unconstrained as possible, we do not
currently want to support
IndexMut, in case some other strategy willeventually be needed.
Code currently using mutating index notation can use
get_mutinstead.[breaking-change]
Closes#23448
r? @gankro